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

Unified Diff: third_party/WebKit/Source/devtools/front_end/main/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/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) {
+ 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