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

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

Issue 2848653003: Add a DevTools command to create an isolated world for a given frame (Closed)
Patch Set: Rebased Created 3 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script>
4 <script>
5
6 function test()
7 {
8 var mainFrameId = "";
9 InspectorTest.eventHandler["Runtime.executionContextCreated"] =
10 function(message) {
11 if (message.params.context.auxData.frameId !== mainFrameId)
12 return;
13 if (message.params.context.auxData.isDefault === false &&
14 message.params.context.name === "Test world") {
15 InspectorTest.log("PASS - isolated world created.");
16 } else {
17 InspectorTest.log("fail - main world created.");
18 InspectorTest.log(JSON.stringify(message.params));
19 }
20 InspectorTest.completeTest();
21 };
22
23 InspectorTest.sendCommandOrDie("Runtime.enable", {}, runtimeAgentEnabled);
24
25 function runtimeAgentEnabled() {
26 InspectorTest.log("Runtime enabled");
27
28 InspectorTest.sendCommandOrDie("Page.enable", {}, pageAgentEnabled);
29 }
30
31 function pageAgentEnabled() {
32 InspectorTest.log("Page enabled");
33 InspectorTest.sendCommandOrDie(
34 "Page.getResourceTree", {}, resourceTreeLoaded);
35 }
36
37 function resourceTreeLoaded(payload) {
38 mainFrameId = payload.frameTree.frame.id;
39 onMainFrameId(mainFrameId);
40 }
41
42 function onMainFrameId(mainFrameId) {
43 InspectorTest.log("Main Frame obtained");
44 InspectorTest.sendCommandOrDie("Page.createIsolatedWorld", {
45 frameId: mainFrameId, worldName: "Test world"});
46 }
47 }
48
49 </script>
50 </head>
51 <body onload="runTest()">
52 </body>
53 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698