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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 (async function(testRunner) {
2 let {page, session, dp} = await testRunner.startBlank('');
3
4 await dp.Runtime.enable();
5 testRunner.log('Runtime enabled');
6
7 await dp.Page.enable();
8 testRunner.log('Page enabled');
9
10 var response = await dp.Page.getResourceTree();
11 var mainFrameId = response.result.frameTree.frame.id;
12 testRunner.log('Main Frame obtained');
13
14 dp.Page.createIsolatedWorld({frameId: mainFrameId, worldName: 'Test world'});
15 dp.Runtime.onExecutionContextCreated(message => {
16 if (message.params.context.auxData.frameId !== mainFrameId)
17 return;
18 if (message.params.context.auxData.isDefault === false && message.params.con text.name === 'Test world') {
19 testRunner.log('PASS - isolated world created.');
20 } else {
21 testRunner.log('fail - main world created.');
22 testRunner.log(JSON.stringify(message.params));
23 }
24 testRunner.completeTest();
25 });
26 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698