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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/elements-inspect-iframe-from-different-domain.html

Issue 1668603003: Devtools: Switch JS execution context to match inspected node (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/elements/selected-element-changes-execution-context.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/console-test.js"></script> 4 <script src="../../http/tests/inspector/console-test.js"></script>
5 <script src="../../http/tests/inspector/elements-test.js"></script> 5 <script src="../../http/tests/inspector/elements-test.js"></script>
6 <script> 6 <script>
7 var el1; 7 var el1;
8 var el2; 8 var el2;
9 function createDynamicElements() 9 function createDynamicElements()
10 { 10 {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 InspectorTest.runAfterPendingDispatches(step3); 45 InspectorTest.runAfterPendingDispatches(step3);
46 } 46 }
47 47
48 function step3() 48 function step3()
49 { 49 {
50 var id = selectedNodeId(); 50 var id = selectedNodeId();
51 if (id === "main-frame-div") 51 if (id === "main-frame-div")
52 InspectorTest.addResult("PASS: selected node with id '" + id + "'") ; 52 InspectorTest.addResult("PASS: selected node with id '" + id + "'") ;
53 else 53 else
54 InspectorTest.addResult("FAIL: unexpected selection " + id); 54 InspectorTest.addResult("FAIL: unexpected selection " + id);
55 InspectorTest.evaluateInConsole("inspect(el2)", step4); 55 // Frame was changed to the iframe. Moving back to the top frame.
56 InspectorTest.evaluateInConsole("inspect(window.frameElement.parentEleme nt)", step4);
56 } 57 }
57 58
58 function step4() 59 function step4()
59 { 60 {
60 InspectorTest.runAfterPendingDispatches(step5); 61 InspectorTest.runAfterPendingDispatches(step5);
61 } 62 }
62 63
63 function step5() 64 function step5()
64 { 65 {
66 InspectorTest.evaluateInConsole("inspect(el2)", step6);
67 }
68
69 function step6()
70 {
71 InspectorTest.runAfterPendingDispatches(step7);
72 }
73
74 function step7()
75 {
65 var id = selectedNodeId(); 76 var id = selectedNodeId();
66 if (id === "iframe-div") 77 if (id === "iframe-div")
67 InspectorTest.addResult("PASS: selected node with id '" + id + "'") ; 78 InspectorTest.addResult("PASS: selected node with id '" + id + "'") ;
68 else 79 else
69 InspectorTest.addResult("FAIL: unexpected selection " + id); 80 InspectorTest.addResult("FAIL: unexpected selection " + id);
70 InspectorTest.completeTest(); 81 InspectorTest.completeTest();
71 } 82 }
72 } 83 }
73 84
74 </script> 85 </script>
75 </head> 86 </head>
76 87
77 <body onload="runTest()"> 88 <body onload="runTest()">
78 <p>Test that web inspector can select element in an iframe even if the element w as created 89 <p>Test that web inspector can select element in an iframe even if the element w as created
79 via <code>createElement</code> of <code>document</code> other than iframe's <cod e>document</code>. 90 via <code>createElement</code> of <code>document</code> other than iframe's <cod e>document</code>.
80 <a href="https://bugs.webkit.org/show_bug.cgi?id=60031">Bug 60031</a> 91 <a href="https://bugs.webkit.org/show_bug.cgi?id=60031">Bug 60031</a>
81 </p> 92 </p>
82 <iframe style="width:400px"></iframe> 93 <iframe style="width:400px"></iframe>
83 </body> 94 </body>
84 </html> 95 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/elements/selected-element-changes-execution-context.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698