diff --git a/modules/benchmarks/e2e_test/naive_infinite_scroll_perf.es6 b/modules/benchmarks/e2e_test/naive_infinite_scroll_perf.es6 index 3a898099fd..9efa10b361 100644 --- a/modules/benchmarks/e2e_test/naive_infinite_scroll_perf.es6 +++ b/modules/benchmarks/e2e_test/naive_infinite_scroll_perf.es6 @@ -13,8 +13,8 @@ describe('ng2 naive infinite scroll benchmark', function () { url: URL, id: 'ng2.naive_infinite_scroll', work: function() { - element(by.deepCss('#reset-btn')).click(); - element(by.deepCss('#run-btn')).click(); + $('#reset-btn').click(); + $('#run-btn').click(); browser.wait(() => { return $('#done').getText().then( function() { return true; }, diff --git a/modules/benchmarks/e2e_test/naive_infinite_scroll_spec.es6 b/modules/benchmarks/e2e_test/naive_infinite_scroll_spec.es6 index 9170ee49c7..f5ca6b9e83 100644 --- a/modules/benchmarks/e2e_test/naive_infinite_scroll_spec.es6 +++ b/modules/benchmarks/e2e_test/naive_infinite_scroll_spec.es6 @@ -53,10 +53,8 @@ describe('ng2 naive infinite scroll benchmark', function () { }); }) - browser.executeScript( - 'document.querySelector("scroll-app /deep/ #reset-btn").click()'); - browser.executeScript( - 'document.querySelector("scroll-app /deep/ #run-btn").click()'); + $("#reset-btn").click(); + $("#run-btn").click(); browser.wait(() => { return $('#done').getText().then( function() { return true; }, diff --git a/modules/benchmarks/src/naive_infinite_scroll/app.js b/modules/benchmarks/src/naive_infinite_scroll/app.js index b6494012ba..44662e6bca 100644 --- a/modules/benchmarks/src/naive_infinite_scroll/app.js +++ b/modules/benchmarks/src/naive_infinite_scroll/app.js @@ -23,11 +23,10 @@ export class App { for (var i = 0; i < appSize; i++) { ListWrapper.push(this.scrollAreas, i); } - // TODO(tbosch): change to bindAction when it works in pub serve - DOM.on(DOM.query('scroll-app /deep/ #run-btn'), 'click', (_) => { + bindAction('#run-btn', () => { this.runBenchmark(); }); - DOM.on(DOM.query('scroll-app /deep/ #reset-btn'), 'click', (_) => { + bindAction('#reset-btn', () => { this._getScrollDiv().scrollTop = 0; var existingMarker = this._locateFinishedMarker(); if (isPresent(existingMarker)) { @@ -90,10 +89,6 @@ export function setupReflectorForApp() {
Following tables are only here to add weight to the UI:
diff --git a/modules/benchmarks/src/naive_infinite_scroll/index.html b/modules/benchmarks/src/naive_infinite_scroll/index.html index bbdb070cec..701cdaecd5 100644 --- a/modules/benchmarks/src/naive_infinite_scroll/index.html +++ b/modules/benchmarks/src/naive_infinite_scroll/index.html @@ -9,6 +9,10 @@ Iteration count:Following tables are only here to add weight to the UI:
@@ -39,10 +35,10 @@ class App implements ShadowRootAware { @override void onShadowRoot(ShadowRoot shadowRoot) { - bindAction('scroll-app /deep/ #run-btn', () { + bindAction('#run-btn', () { runBenchmark(); }); - bindAction('scroll-app /deep/ #reset-btn', () { + bindAction('#reset-btn', () { scrollTop = 0; }); } diff --git a/modules/benchmarks_external/src/naive_infinite_scroll/index.html b/modules/benchmarks_external/src/naive_infinite_scroll/index.html index bbdb070cec..701cdaecd5 100644 --- a/modules/benchmarks_external/src/naive_infinite_scroll/index.html +++ b/modules/benchmarks_external/src/naive_infinite_scroll/index.html @@ -9,6 +9,10 @@ Iteration count: