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

Side by Side Diff: LayoutTests/http/tests/inspector-enabled/shadow-dom-rules.html

Issue 197283031: DevTools: fix author shadow dom inspection mode, speacial-case ua. Fix crash from the bug. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector-enabled/shadow-dom-rules-restart.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="../inspector/inspector-test.js"></script> 3 <script src="../inspector/inspector-test.js"></script>
4 <script src="../inspector/elements-test.js"></script> 4 <script src="../inspector/elements-test.js"></script>
5 <script> 5 <script>
6 6
7 function createShadowRoot() 7 function createShadowRoot()
8 { 8 {
9 if (window.testRunner) 9 if (window.testRunner)
10 testRunner.waitUntilDone(); 10 testRunner.waitUntilDone();
11 var template = document.querySelector('#tmpl'); 11 var template = document.querySelector('#tmpl');
12 var root = document.querySelector('#host').webkitCreateShadowRoot(); 12 var root = document.querySelector('#host').webkitCreateShadowRoot();
13 root.appendChild(template.content.cloneNode(true)); 13 root.appendChild(template.content.cloneNode(true));
14 if (window.testRunner) 14 if (window.testRunner)
15 testRunner.showWebInspector(); 15 testRunner.showWebInspector();
16 runTest(); 16 runTest();
17 } 17 }
18 18
19 function test() 19 function test()
20 { 20 {
21 InspectorTest.runTestSuite([ 21 InspectorTest.runTestSuite([
22 function testInit(next) 22 function testInit(next)
23 { 23 {
24 WebInspector.settings.showShadowDOM.set(true);
25 InspectorTest.selectNodeAndWaitForStyles("inner", next); 24 InspectorTest.selectNodeAndWaitForStyles("inner", next);
26 }, 25 },
27 26
28 function testDumpStyles(next) 27 function testDumpStyles(next)
29 { 28 {
30 InspectorTest.dumpSelectedElementStyles(true); 29 InspectorTest.dumpSelectedElementStyles(true);
31 next(); 30 next();
32 } 31 }
33 ]); 32 ]);
34 } 33 }
35 </script> 34 </script>
36 </head> 35 </head>
37 36
38 <body onload="createShadowRoot()"> 37 <body onload="createShadowRoot()">
39 <p> 38 <p>
40 This test checks that style sheets hosted inside shadow roots 39 This test checks that style sheets hosted inside shadow roots
41 could be inspected. 40 could be inspected.
42 </p> 41 </p>
43 <div id="host"></div> 42 <div id="host"></div>
44 <template id="tmpl"> 43 <template id="tmpl">
45 <style> .red { color: red; } </style> 44 <style> .red { color: red; } </style>
46 <div id="inner" class="red">hi!</div> 45 <div id="inner" class="red">hi!</div>
47 </template> 46 </template>
48 </body> 47 </body>
49 </html> 48 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector-enabled/shadow-dom-rules-restart.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698