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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-deprecated-methods.js

Issue 2954093003: [DevTools] Migrate inspector-protocol/runtime tests to new harness (Closed)
Patch Set: fail: 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
Index: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-deprecated-methods.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-deprecated-methods.js b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-deprecated-methods.js
new file mode 100644
index 0000000000000000000000000000000000000000..186c9422ea855e4c6c96cf6cbcdee3f0c7e9aa94
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-deprecated-methods.js
@@ -0,0 +1,23 @@
+(async function(testRunner) {
+ let {page, session, dp} = await testRunner.startBlank(`Tests checks that deprecation messages for console.`);
+
+ var messagesLeft = 3;
+ dp.Runtime.onConsoleAPICalled(data => {
+ var text = data.params.args[0].value;
+ if (text.indexOf('deprecated') === -1)
+ return;
+ testRunner.log(text);
+ if (!--messagesLeft)
+ testRunner.completeTest();
+ });
+
+ dp.Runtime.enable();
+ var deprecatedMethods = [
+ `console.timeline('42')`,
+ `console.timeline('42')`,
+ `console.timeline('42')`, // three calls should produce one warning message
+ `console.timelineEnd('42')`,
+ `console.markTimeline('42')`,
+ ];
+ dp.Runtime.evaluate({ expression: deprecatedMethods.join(';') });
+})

Powered by Google App Engine
This is Rietveld 408576698