2015-02-11 14:40:29 -05:00
|
|
|
var perfUtil = require('angular2/e2e_test/perf_util');
|
2015-01-27 12:53:22 -05:00
|
|
|
|
|
|
|
describe('ng-dart1.x naive infinite scroll benchmark', function () {
|
|
|
|
|
2015-02-02 19:25:34 -05:00
|
|
|
var URL = 'benchmarks_external/src/naive_infinite_scroll/index.html';
|
2015-01-27 12:53:22 -05:00
|
|
|
|
|
|
|
afterEach(perfUtil.verifyNoBrowserErrors);
|
|
|
|
|
|
|
|
[1, 2, 4].forEach(function(appSize) {
|
|
|
|
it('should run scroll benchmark and collect stats for appSize = ' +
|
2015-02-11 13:13:49 -05:00
|
|
|
appSize, function(done) {
|
2015-01-27 12:53:22 -05:00
|
|
|
perfUtil.runBenchmark({
|
|
|
|
url: URL,
|
|
|
|
id: 'ng1-dart1.x.naive_infinite_scroll',
|
|
|
|
work: function() {
|
2015-02-17 16:19:19 -05:00
|
|
|
element(by.deepCss('#reset-btn')).click();
|
|
|
|
element(by.deepCss('#run-btn')).click();
|
2015-02-05 21:33:57 -05:00
|
|
|
var s = 1000;
|
|
|
|
if (appSize > 4) {
|
|
|
|
s = s + appSize * 100;
|
|
|
|
}
|
|
|
|
browser.sleep(s);
|
2015-01-27 12:53:22 -05:00
|
|
|
},
|
|
|
|
params: [{
|
|
|
|
name: 'appSize', value: appSize
|
|
|
|
}, {
|
|
|
|
name: 'iterationCount', value: 20, scale: 'linear'
|
|
|
|
}, {
|
|
|
|
name: 'scrollIncrement', value: 40
|
|
|
|
}]
|
2015-02-11 13:13:49 -05:00
|
|
|
}).then(done, done.fail);
|
2015-01-27 12:53:22 -05:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|