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

Side by Side Diff: LayoutTests/inspector/elements/elements-panel-shadow-selection-on-refresh.html

Issue 935283002: Rename {Author,UserAgent}ShadowRoot to {Open,Closed}ShadowRoot. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix inspector tests Created 5 years, 10 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 | Annotate | Revision Log
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 9
10 InspectorTest.runTestSuite([ 10 InspectorTest.runTestSuite([
11 function setup(next) 11 function setup(next)
12 { 12 {
13 WebInspector.settings.showUAShadowDOM.set(true); 13 WebInspector.settings.showUAShadowDOM.set(true);
14 InspectorTest.expandElementsTree(next); 14 InspectorTest.expandElementsTree(next);
15 }, 15 },
16 16
17 function testAuthorShadowRoot(next) 17 function testOpenShadowRoot(next)
18 { 18 {
19 InspectorTest.findNode(isAuthorShadowRoot, selectReloadAndDump.bind( null, next)); 19 InspectorTest.findNode(isOpenShadowRoot, selectReloadAndDump.bind(nu ll, next));
20 }, 20 },
21 21
22 function testUserAgentShadowRoot(next) 22 function testClosedShadowRoot(next)
23 { 23 {
24 InspectorTest.findNode(isUserAgentShadowRoot, selectReloadAndDump.bi nd(null, next)); 24 InspectorTest.findNode(isClosedShadowRoot, selectReloadAndDump.bind( null, next));
25 }, 25 },
26 26
27 function testAuthorShadowRootChild(next) 27 function testOpenShadowRootChild(next)
28 { 28 {
29 InspectorTest.findNode(isAuthorShadowRootChild, selectReloadAndDump. bind(null, next)); 29 InspectorTest.findNode(isOpenShadowRootChild, selectReloadAndDump.bi nd(null, next));
30 }, 30 },
31 31
32 function testUserAgentShadowRootChild(next) 32 function testClosedShadowRootChild(next)
33 { 33 {
34 InspectorTest.findNode(isUserAgentShadowRootChild, selectReloadAndDu mp.bind(null, next)); 34 InspectorTest.findNode(isClosedShadowRootChild, selectReloadAndDump. bind(null, next));
35 } 35 }
36 ]); 36 ]);
37 37
38 function isAuthorShadowRoot(node) 38 function isOpenShadowRoot(node)
39 { 39 {
40 return node && node.shadowRootType() === WebInspector.DOMNode.ShadowRoot Types.Author; 40 return node && node.shadowRootType() === WebInspector.DOMNode.ShadowRoot Types.Author;
41 } 41 }
42 42
43 function isUserAgentShadowRoot(node) 43 function isClosedShadowRoot(node)
44 { 44 {
45 return node && node.shadowRootType() === WebInspector.DOMNode.ShadowRoot Types.UserAgent; 45 return node && node.shadowRootType() === WebInspector.DOMNode.ShadowRoot Types.UserAgent;
46 } 46 }
47 47
48 function isAuthorShadowRootChild(node) 48 function isOpenShadowRootChild(node)
49 { 49 {
50 return isAuthorShadowRoot(node.parentNode); 50 return isOpenShadowRoot(node.parentNode);
51 } 51 }
52 52
53 function isUserAgentShadowRootChild(node) 53 function isClosedShadowRootChild(node)
54 { 54 {
55 return isUserAgentShadowRoot(node.parentNode); 55 return isClosedShadowRoot(node.parentNode);
56 } 56 }
57 57
58 function selectReloadAndDump(next, node) 58 function selectReloadAndDump(next, node)
59 { 59 {
60 InspectorTest.selectNode(node).then(step0); 60 InspectorTest.selectNode(node).then(step0);
61 61
62 function step0() 62 function step0()
63 { 63 {
64 InspectorTest.reloadPage(step1); 64 InspectorTest.reloadPage(step1);
65 } 65 }
(...skipping 25 matching lines...) Expand all
91 <p> 91 <p>
92 Tests that elements panel preserves selected shadow DOM node on page refresh. 92 Tests that elements panel preserves selected shadow DOM node on page refresh.
93 </p> 93 </p>
94 <span id="hostElement"></span> 94 <span id="hostElement"></span>
95 <script> 95 <script>
96 var root = document.getElementById("hostElement").createShadowRoot(); 96 var root = document.getElementById("hostElement").createShadowRoot();
97 root.innerHTML = "<input type='text'>"; 97 root.innerHTML = "<input type='text'>";
98 </script> 98 </script>
99 </body> 99 </body>
100 </html> 100 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698