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