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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld.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/createIsolatedWorld.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld.js b/third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld.js
new file mode 100644
index 0000000000000000000000000000000000000000..25946db5b623f58d1ddf63a80d5692f99f0275c2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld.js
@@ -0,0 +1,26 @@
+(async function(testRunner) {
+ let {page, session, dp} = await testRunner.startBlank('');
+
+ await dp.Runtime.enable();
+ testRunner.log('Runtime enabled');
+
+ await dp.Page.enable();
+ testRunner.log('Page enabled');
+
+ var response = await dp.Page.getResourceTree();
+ var mainFrameId = response.result.frameTree.frame.id;
+ testRunner.log('Main Frame obtained');
+
+ dp.Page.createIsolatedWorld({frameId: mainFrameId, worldName: 'Test world'});
+ dp.Runtime.onExecutionContextCreated(message => {
+ if (message.params.context.auxData.frameId !== mainFrameId)
+ return;
+ if (message.params.context.auxData.isDefault === false && message.params.context.name === 'Test world') {
+ testRunner.log('PASS - isolated world created.');
+ } else {
+ testRunner.log('fail - main world created.');
+ testRunner.log(JSON.stringify(message.params));
+ }
+ testRunner.completeTest();
+ });
+})

Powered by Google App Engine
This is Rietveld 408576698