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(); |
+}) |