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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/shadow/breadcrumb-shadow-roots.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 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.or g/TR/html4/loose.dtd"> 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.or g/TR/html4/loose.dtd">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../http/tests/inspector/inspector-test.js"></script> 4 <script src="../../../http/tests/inspector/inspector-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 7
8 function loaded() 8 function loaded()
9 { 9 {
10 var template = document.querySelector("#tmpl"); 10 var template = document.querySelector("#tmpl");
11 var root = document.querySelector("#host").createShadowRoot(); 11 var root = document.querySelector("#host").createShadowRoot();
12 root.appendChild(template.content.cloneNode(true)); 12 root.appendChild(template.content.cloneNode(true));
13 var rootClosed = document.querySelector("#hostClosed").attachShadow({mode: ' closed'}); 13 var rootClosed = document.querySelector("#hostClosed").attachShadow({mode: ' closed'});
14 rootClosed.appendChild(template.content.cloneNode(true)); 14 rootClosed.appendChild(template.content.cloneNode(true));
15 runTest(); 15 runTest();
16 } 16 }
17 17
18 function test() 18 function test()
19 { 19 {
20 WebInspector.settingForTest("showUAShadowDOM").set(true); 20 Common.settingForTest("showUAShadowDOM").set(true);
21 InspectorTest.expandElementsTree(step0); 21 InspectorTest.expandElementsTree(step0);
22 22
23 function step0() 23 function step0()
24 { 24 {
25 selectNode(matchUserAgentShadowRoot, step1); 25 selectNode(matchUserAgentShadowRoot, step1);
26 } 26 }
27 27
28 function step1() 28 function step1()
29 { 29 {
30 InspectorTest.dumpBreadcrumb("User-agent shadow root breadcrumb"); 30 InspectorTest.dumpBreadcrumb("User-agent shadow root breadcrumb");
(...skipping 10 matching lines...) Expand all
41 { 41 {
42 InspectorTest.dumpBreadcrumb("Closed shadow root breadcrumb"); 42 InspectorTest.dumpBreadcrumb("Closed shadow root breadcrumb");
43 InspectorTest.completeTest(); 43 InspectorTest.completeTest();
44 } 44 }
45 45
46 function selectNode(matchFunction, next) 46 function selectNode(matchFunction, next)
47 { 47 {
48 InspectorTest.findNode(matchFunction, callback); 48 InspectorTest.findNode(matchFunction, callback);
49 function callback(node) 49 function callback(node)
50 { 50 {
51 WebInspector.Revealer.revealPromise(node).then(next); 51 Common.Revealer.revealPromise(node).then(next);
52 } 52 }
53 } 53 }
54 54
55 function matchUserAgentShadowRoot(node) 55 function matchUserAgentShadowRoot(node)
56 { 56 {
57 return node.shadowRootType() === WebInspector.DOMNode.ShadowRootTypes.Us erAgent; 57 return node.shadowRootType() === SDK.DOMNode.ShadowRootTypes.UserAgent;
58 } 58 }
59 59
60 function matchOpenShadowRoot(node) 60 function matchOpenShadowRoot(node)
61 { 61 {
62 return node.shadowRootType() === WebInspector.DOMNode.ShadowRootTypes.Op en; 62 return node.shadowRootType() === SDK.DOMNode.ShadowRootTypes.Open;
63 } 63 }
64 64
65 function matchClosedShadowRoot(node) 65 function matchClosedShadowRoot(node)
66 { 66 {
67 return node.shadowRootType() === WebInspector.DOMNode.ShadowRootTypes.Cl osed; 67 return node.shadowRootType() === SDK.DOMNode.ShadowRootTypes.Closed;
68 } 68 }
69 } 69 }
70 70
71 </script> 71 </script>
72 </head> 72 </head>
73 73
74 <body onload="loaded()"> 74 <body onload="loaded()">
75 <p> 75 <p>
76 Tests that shadow roots are displayed correctly in breadcrumbs. 76 Tests that shadow roots are displayed correctly in breadcrumbs.
77 </p> 77 </p>
78 78
79 <input type="text"> 79 <input type="text">
80 <div id="host"></div> 80 <div id="host"></div>
81 <div id="hostClosed"></div> 81 <div id="hostClosed"></div>
82 <template id="tmpl"> 82 <template id="tmpl">
83 <style>.red { color: red; }</style> 83 <style>.red { color: red; }</style>
84 <div id="inner" class="red">inner</div> 84 <div id="inner" class="red">inner</div>
85 </template> 85 </template>
86 86
87 87
88 </body> 88 </body>
89 </html> 89 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698