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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld.js

Issue 2947303002: [DevTools] Migrate inspector-protocol/{page,dom-snapshot} tests to new harness (Closed)
Patch Set: rebased Created 3 years, 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 (async function(testRunner) {
2 let {page, session, dp} = await testRunner.startBlank('');
3
4 var reportedExecutionContextId;
5 dp.Runtime.onExecutionContextCreated(message => {
6 if (message.params.context.auxData.frameId !== mainFrameId)
7 return;
8 if (message.params.context.auxData.isDefault === false &&
9 message.params.context.name === 'Test world') {
10 reportedExecutionContextId = message.params.context.id;
11 } else {
12 testRunner.log('fail - main world created.');
13 testRunner.log(JSON.stringify(message.params));
14 testRunner.completeTest();
15 }
16 });
17
18 await dp.Runtime.enable();
19 testRunner.log('Runtime enabled');
20
21 await dp.Page.enable();
22 testRunner.log('Page enabled');
23
24 var response = await dp.Page.getResourceTree();
25 var mainFrameId = response.result.frameTree.frame.id;
26 testRunner.log('Main Frame obtained');
27
28 response = await dp.Page.createIsolatedWorld({frameId: mainFrameId, worldName: 'Test world'});
29 if (reportedExecutionContextId === response.result.executionContextId)
30 testRunner.log('PASS - execution context id match.');
31 else
32 testRunner.log('fail - execution context id differ.');
33 testRunner.completeTest();
34 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698