Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6151)

Unified Diff: chrome/test/data/webui/polymer_browser_test_base.js

Issue 2926163002: MD WebUI: remove timing logs from Polymer-based browser tests (Closed)
Patch Set: whoops Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/polymer_browser_test_base.js
diff --git a/chrome/test/data/webui/polymer_browser_test_base.js b/chrome/test/data/webui/polymer_browser_test_base.js
index 4165afc4b42fb28c96a80d1cfcc5d7da415ab637..150a30b9a0714309c56389029ea94543c6411515 100644
--- a/chrome/test/data/webui/polymer_browser_test_base.js
+++ b/chrome/test/data/webui/polymer_browser_test_base.js
@@ -11,8 +11,7 @@
* @constructor
* @extends testing.Test
*/
-function PolymerTest() {
-}
+function PolymerTest() {}
PolymerTest.prototype = {
__proto__: testing.Test.prototype,
@@ -43,18 +42,6 @@ PolymerTest.prototype = {
'chrome/test/data/webui/mocha_adapter.js',
],
- /** Time when preLoad starts, i.e. before the browsePreload page is loaded. */
- preloadTime: 0,
-
- /** Time when test run starts. */
- runTime: 0,
-
- /** @override */
- preLoad: function() {
- this.preloadTime = window.performance.now();
- testing.Test.prototype.preLoad.call(this);
- },
-
/** @override */
setUp: function() {
testing.Test.prototype.setUp.call(this);
@@ -108,25 +95,12 @@ PolymerTest.prototype = {
});
},
- /** @override */
- runTest: function(testBody) {
- this.runTime = window.performance.now();
- testing.Test.prototype.runTest.call(this, testBody);
- },
-
/** @override */
tearDown: function() {
// Note: We do this in tearDown() so that we have a chance to stamp all the
// dom-if templates, add elements through interaction, etc.
PolymerTest.testIronIcons(document.body);
- var endTime = window.performance.now();
- var delta = this.runTime - this.preloadTime;
- console.log('Page load time: ' + delta.toFixed(0) + " ms");
- delta = endTime - this.runTime;
- console.log('Test run time: ' + delta.toFixed(0) + " ms");
- delta = endTime - this.preloadTime;
- console.log('Total time: ' + delta.toFixed(0) + " ms");
testing.Test.prototype.tearDown.call(this);
}
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698