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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/shadow/reveal-shadow-dom-node.html

Issue 2412023002: DevTools: migrate InspectorView to tabbed view location. (Closed)
Patch Set: made layers panel closeable. Created 4 years, 2 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
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 6
7 function test() 7 function test()
8 { 8 {
9 InspectorTest.firstElementsTreeOutline().addEventListener(WebInspector.Eleme ntsTreeOutline.Events.SelectedNodeChanged, selectedNodeChanged); 9 InspectorTest.firstElementsTreeOutline().addEventListener(WebInspector.Eleme ntsTreeOutline.Events.SelectedNodeChanged, selectedNodeChanged);
10 10
(...skipping 15 matching lines...) Expand all
26 return "(in " + (node.ancestorUserAgentShadowRoot() ? "user-agent" : "au thor") + " shadow DOM)"; 26 return "(in " + (node.ancestorUserAgentShadowRoot() ? "user-agent" : "au thor") + " shadow DOM)";
27 } 27 }
28 28
29 InspectorTest.nodeWithId("nested-input", function(node) { 29 InspectorTest.nodeWithId("nested-input", function(node) {
30 node.shadowRoots()[0].getChildNodes(childrenCallback); 30 node.shadowRoots()[0].getChildNodes(childrenCallback);
31 31
32 function childrenCallback(children) 32 function childrenCallback(children)
33 { 33 {
34 var shadowDiv = children[0]; 34 var shadowDiv = children[0];
35 InspectorTest.addResult("User-agent shadow DOM hidden:"); 35 InspectorTest.addResult("User-agent shadow DOM hidden:");
36 WebInspector.panels.elements.revealAndSelectNode(shadowDiv); 36 WebInspector.panels.elements.revealAndSelectNode(shadowDiv).then(() => {
37 WebInspector.settingForTest("showUAShadowDOM").set(true); 37 WebInspector.settingForTest("showUAShadowDOM").set(true);
38 InspectorTest.addResult("User-agent shadow DOM shown:"); 38 InspectorTest.addResult("User-agent shadow DOM shown:");
39 WebInspector.panels.elements.revealAndSelectNode(shadowDiv); 39 WebInspector.panels.elements.revealAndSelectNode(shadowDiv);
40 });
40 } 41 }
41 }); 42 });
42 } 43 }
43 </script> 44 </script>
44 </head> 45 </head>
45 46
46 <body onload="runTest()"> 47 <body onload="runTest()">
47 48
48 <p id="description">This test verifies that the correct node is revealed in the DOM tree when asked to reveal a user-agent shadow DOM node.</p> 49 <p id="description">This test verifies that the correct node is revealed in the DOM tree when asked to reveal a user-agent shadow DOM node.</p>
49 50
50 <p id="test1"></p> 51 <p id="test1"></p>
51 52
52 <script> 53 <script>
53 var input = document.createElement("input"); 54 var input = document.createElement("input");
54 input.id = "nested-input"; 55 input.id = "nested-input";
55 input.value = "test"; 56 input.value = "test";
56 test1.createShadowRoot().appendChild(input); 57 test1.createShadowRoot().appendChild(input);
57 </script> 58 </script>
58 59
59 </body> 60 </body>
60 </html> 61 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698