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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/selected-element-changes-execution-context.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/elements-test.js"></script> 4 <script src="../../http/tests/inspector/elements-test.js"></script>
5 <script> 5 <script>
6 function test() 6 function test()
7 { 7 {
8 var mainContext; 8 var mainContext;
9 9
10 InspectorTest.runTestSuite([ 10 InspectorTest.runTestSuite([
11 function initialize(next) 11 function initialize(next)
12 { 12 {
13 InspectorTest.expandElementsTree(onExpanded); 13 InspectorTest.expandElementsTree(onExpanded);
14 14
15 function onExpanded() 15 function onExpanded()
16 { 16 {
17 mainContext = WebInspector.context.flavor(WebInspector.Execution Context); 17 mainContext = UI.context.flavor(SDK.ExecutionContext);
18 dumpContextAndNext(next); 18 dumpContextAndNext(next);
19 } 19 }
20 }, 20 },
21 21
22 function selectIframeInnerNode(next) 22 function selectIframeInnerNode(next)
23 { 23 {
24 InspectorTest.selectNodeWithId("head", dumpContextAndNext.bind(null, next)); 24 InspectorTest.selectNodeWithId("head", dumpContextAndNext.bind(null, next));
25 }, 25 },
26 26
27 function selectMainFrameNode(next) 27 function selectMainFrameNode(next)
28 { 28 {
29 InspectorTest.selectNodeWithId("element", dumpContextAndNext.bind(nu ll, next)); 29 InspectorTest.selectNodeWithId("element", dumpContextAndNext.bind(nu ll, next));
30 }, 30 },
31 31
32 function selectIframeNode(next) 32 function selectIframeNode(next)
33 { 33 {
34 InspectorTest.selectNodeWithId("iframe-per-se", dumpContextAndNext.b ind(null, next)); 34 InspectorTest.selectNodeWithId("iframe-per-se", dumpContextAndNext.b ind(null, next));
35 }, 35 },
36 36
37 function selectIframeImmediateChild(next) 37 function selectIframeImmediateChild(next)
38 { 38 {
39 var iframe = WebInspector.context.flavor(WebInspector.DOMNode); 39 var iframe = UI.context.flavor(SDK.DOMNode);
40 var child = iframe.firstChild; 40 var child = iframe.firstChild;
41 InspectorTest.selectNode(child).then(dumpContextAndNext.bind(null, n ext)); 41 InspectorTest.selectNode(child).then(dumpContextAndNext.bind(null, n ext));
42 }, 42 },
43 ]); 43 ]);
44 44
45 function dumpContextAndNext(next) 45 function dumpContextAndNext(next)
46 { 46 {
47 var context = WebInspector.context.flavor(WebInspector.ExecutionContext) ; 47 var context = UI.context.flavor(SDK.ExecutionContext);
48 var node = WebInspector.context.flavor(WebInspector.DOMNode); 48 var node = UI.context.flavor(SDK.DOMNode);
49 var contextName = context === mainContext ? "main" : "iframe"; 49 var contextName = context === mainContext ? "main" : "iframe";
50 var matchesNode = context.frameId === node.frameId(); 50 var matchesNode = context.frameId === node.frameId();
51 InspectorTest.addResult("Execution Context: " + contextName); 51 InspectorTest.addResult("Execution Context: " + contextName);
52 InspectorTest.addResult(" matches: " + matchesNode); 52 InspectorTest.addResult(" matches: " + matchesNode);
53 next(); 53 next();
54 } 54 }
55 } 55 }
56 </script> 56 </script>
57 </head> 57 </head>
58 <body> 58 <body>
59 <p>Tests that the execution context is changed to match new selected node.</ p> 59 <p>Tests that the execution context is changed to match new selected node.</ p>
60 <iframe id="iframe-per-se" src="resources/set-outer-html-body-iframe.html" o nload="runTest()"></iframe> 60 <iframe id="iframe-per-se" src="resources/set-outer-html-body-iframe.html" o nload="runTest()"></iframe>
61 <div id="element"></div> 61 <div id="element"></div>
62 </body> 62 </body>
63 </html> 63 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698