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

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

Issue 2742623002: DevTools: improve test infrastructure w/ devtools driving the test (Closed)
Patch Set: fixup Created 3 years, 9 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/timer/Timer.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timer/Timer.js b/third_party/WebKit/Source/devtools/front_end/timer/Timer.js
new file mode 100644
index 0000000000000000000000000000000000000000..9ae0904c80cd9f3cbf0f6ec861cc25ae1d8074e3
--- /dev/null
+++ b/third_party/WebKit/Source/devtools/front_end/timer/Timer.js
@@ -0,0 +1,17 @@
+/**
+ * @param {string} label
+ */
+Timer.time = function(label) {
dgozman 2017/03/10 00:17:17 Just add a helper in Main.js for now?
+ if (Host.isUnderTest())
+ return;
+ console.time(label);
+};
+
+/**
+ * @param {string} label
+ */
+Timer.timeEnd = function(label) {
+ if (Host.isUnderTest())
+ return;
+ console.timeEnd(label);
+};

Powered by Google App Engine
This is Rietveld 408576698