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

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: unified 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..04c9bfa3d5ca5ad04ba5a861605f0e11fbea406d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable.js
@@ -0,0 +1,33 @@
+(async function() {
+ let {page, session, Protocol} = await InspectorTest.startBlank('');
+
+ var log = [];
+ Protocol.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;
+ }
+ InspectorTest.log('FAIL: Unexpected records arrived');
+ InspectorTest.logObject(msg);
+ });
+
+ await Protocol.Timeline.start();
+ log.push('Timeline started');
+ await Protocol.Page.enable();
+ log.push('Page enabled');
+ await Protocol.Page.disable();
+ log.push('Page disabled');
+
+ await Protocol.Domain.NotExistingCommand();
+ await Protocol.Timeline.stop();
+ log.push('Timeline stopped');
+ for (var i = 0; i < log.length; ++i)
+ InspectorTest.log(log[i]);
+ InspectorTest.completeTest();
+})();

Powered by Google App Engine
This is Rietveld 408576698