Skip to content

Commit dba27ac

Browse files
committed
fixup! test(button): add performance tests for mat-raised-button
1 parent e670f36 commit dba27ac

File tree

4 files changed

+8
-24
lines changed

4 files changed

+8
-24
lines changed

test/benchmarks/material/button/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ component_benchmark(
1515
"@npm//@angular/core",
1616
"@npm//@angular/platform-browser",
1717
"//src/material/button",
18-
"//src/cdk/a11y",
1918
],
2019
ng_srcs = [":app.module.ts"],
2120
prefix = "",

test/benchmarks/material/button/app.module.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,17 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.io/license
77
*/
8-
import {A11yModule} from '@angular/cdk/a11y';
98
import {Component, NgModule, ViewEncapsulation} from '@angular/core';
109
import {BrowserModule} from '@angular/platform-browser';
1110
import {MatButtonModule} from '@angular/material/button';
1211

13-
/**
14-
* @title Button benchmark component.
15-
*/
1612
@Component({
1713
selector: 'app-root',
1814
template: `
1915
<button id="show" (click)="show()">Show</button>
2016
<button id="hide" (click)="hide()">Hide</button>
2117
22-
<ng-container *ngIf="isVisible">
23-
<button mat-raised-button>Basic</button>
24-
</ng-container>
18+
<button *ngIf="isVisible" mat-raised-button>Basic</button>
2519
`,
2620
encapsulation: ViewEncapsulation.None,
2721
styleUrls: ['//src/material/core/theming/prebuilt/indigo-pink.css'],
@@ -38,11 +32,10 @@ export class ButtonBenchmarkApp {
3832
@NgModule({
3933
declarations: [ButtonBenchmarkApp],
4034
imports: [
41-
A11yModule,
4235
BrowserModule,
4336
MatButtonModule,
4437
],
4538
providers: [],
46-
bootstrap: [ButtonBenchmarkApp]
39+
bootstrap: [ButtonBenchmarkApp],
4740
})
4841
export class AppModule {}

test/benchmarks/material/checkbox/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ component_benchmark(
1515
"@npm//@angular/core",
1616
"@npm//@angular/platform-browser",
1717
"//src/material/checkbox",
18-
"//src/cdk/a11y",
1918
],
2019
ng_srcs = [":app.module.ts"],
2120
prefix = "",

test/benchmarks/material/checkbox/app.module.ts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,22 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.io/license
77
*/
8-
import {A11yModule} from '@angular/cdk/a11y';
98
import {Component, NgModule, ViewEncapsulation} from '@angular/core';
109
import {BrowserModule} from '@angular/platform-browser';
1110
import {MatCheckboxModule} from '@angular/material/checkbox';
1211

13-
/**
14-
* @title Checkbox benchmark component.
15-
*/
1612
@Component({
1713
selector: 'app-root',
1814
template: `
1915
<button id="show" (click)="show()">Show</button>
2016
<button id="hide" (click)="hide()">Hide</button>
2117
<button id="indeterminate" (click)="indeterminate()">Indeterminate</button>
2218
23-
<ng-container *ngIf="isVisible">
24-
<mat-checkbox
25-
[checked]="isChecked"
26-
[indeterminate]="isIndeterminate"
27-
(change)="toggleIsChecked()">
28-
Check me!</mat-checkbox>
29-
</ng-container>
19+
<mat-checkbox *ngIf="isVisible"
20+
[checked]="isChecked"
21+
[indeterminate]="isIndeterminate"
22+
(change)="toggleIsChecked()">
23+
Check me!</mat-checkbox>
3024
`,
3125
encapsulation: ViewEncapsulation.None,
3226
styleUrls: ['//src/material/core/theming/prebuilt/indigo-pink.css'],
@@ -46,11 +40,10 @@ export class CheckboxBenchmarkApp {
4640
@NgModule({
4741
declarations: [CheckboxBenchmarkApp],
4842
imports: [
49-
A11yModule,
5043
BrowserModule,
5144
MatCheckboxModule,
5245
],
5346
providers: [],
54-
bootstrap: [CheckboxBenchmarkApp]
47+
bootstrap: [CheckboxBenchmarkApp],
5548
})
5649
export class AppModule {}

0 commit comments

Comments
 (0)