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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable.js

Issue 2942573003: [DevTools] New harness for inspector-protocol layout tests (Closed)
Patch Set: Protocol -> dp 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/page/enable-disable.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable.js b/third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable.js
new file mode 100644
index 0000000000000000000000000000000000000000..cf8a7c242921a02835f41f55232d2c8ae5b31241
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable.js
@@ -0,0 +1,33 @@
+(async function(testRunner) {
+ let {page, session, dp} = await testRunner.startBlank('');
+
+ var log = [];
+ dp.Timeline.onEventRecorded(msg => {
+ if (msg.params.record.type === 'Program') {
+ var children = msg.params.record.children;
+ for (var i = 0; i < children.length; ++i) {
+ var record = children[i];
+ if (record.type === 'GCEvent')
+ continue;
+ log.push('Timeline.eventRecorded: ' + record.type);
+ }
+ return;
+ }
+ testRunner.log('FAIL: Unexpected records arrived');
+ testRunner.logObject(msg);
+ });
+
+ await dp.Timeline.start();
+ log.push('Timeline started');
+ await dp.Page.enable();
+ log.push('Page enabled');
+ await dp.Page.disable();
+ log.push('Page disabled');
+
+ await dp.Domain.NotExistingCommand();
+ await dp.Timeline.stop();
+ log.push('Timeline stopped');
+ for (var i = 0; i < log.length; ++i)
+ testRunner.log(log[i]);
+ testRunner.completeTest();
+})

Powered by Google App Engine
This is Rietveld 408576698