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

Unified Diff: third_party/WebKit/Source/devtools/front_end/main/Timer.js

Issue 2837083003: DevTools: create test infrastructure so devtools drives the test (Closed)
Patch Set: Created 3 years, 8 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
Index: third_party/WebKit/Source/devtools/front_end/main/Timer.js
diff --git a/third_party/WebKit/Source/devtools/front_end/main/Timer.js b/third_party/WebKit/Source/devtools/front_end/main/Timer.js
new file mode 100644
index 0000000000000000000000000000000000000000..a8baec61b4dc622e745a9c5c2da9fba3528231dd
--- /dev/null
+++ b/third_party/WebKit/Source/devtools/front_end/main/Timer.js
@@ -0,0 +1,17 @@
+/**
+ * @param {string} label
+ */
+Main.time = function(label) {
dgozman 2017/04/25 21:08:28 Merge this into Main.js.
chenwilliam 2017/06/15 01:01:05 Done.
+ if (Host.isUnderTest())
+ return;
+ console.time(label);
+};
+
+/**
+ * @param {string} label
+ */
+Main.timeEnd = function(label) {
+ if (Host.isUnderTest())
+ return;
+ console.timeEnd(label);
+};

Powered by Google App Engine
This is Rietveld 408576698