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

Side by Side Diff: LayoutTests/inspector/elements/styles/commit-selector.html

Issue 268293003: DevTools: Get rid of WebInspector.panels (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 <style> 3 <style>
4 #inspected { 4 #inspected {
5 color: green; 5 color: green;
6 } 6 }
7 </style> 7 </style>
8 <script src="../../../http/tests/inspector/inspector-test.js"></script> 8 <script src="../../../http/tests/inspector/inspector-test.js"></script>
9 <script src="../../../http/tests/inspector/elements-test.js"></script> 9 <script src="../../../http/tests/inspector/elements-test.js"></script>
10 <script> 10 <script>
11 11
12 function test() 12 function test()
13 { 13 {
14 WebInspector.inspectorView.showPanel("elements"); 14 WebInspector.inspectorView.showPanel("elements");
15 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); 15 InspectorTest.selectNodeAndWaitForStyles("inspected", step1);
16 16
17 function step1() 17 function step1()
18 { 18 {
19 InspectorTest.addResult("=== Before selector modification ==="); 19 InspectorTest.addResult("=== Before selector modification ===");
20 InspectorTest.dumpSelectedElementStyles(true); 20 InspectorTest.dumpSelectedElementStyles(true);
21 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[ 0][2]; 21 var section = WebInspector.inspectorView.panel("elements").sidebarPanes. styles.sections[0][2];
22 section.startEditingSelector(); 22 section.startEditingSelector();
23 section._selectorElement.textContent = "hr, #inspected "; 23 section._selectorElement.textContent = "hr, #inspected ";
24 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Ent er")); 24 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Ent er"));
25 InspectorTest.runAfterPendingDispatches(step2); 25 InspectorTest.runAfterPendingDispatches(step2);
26 } 26 }
27 27
28 function step2() 28 function step2()
29 { 29 {
30 InspectorTest.addResult("=== After non-affecting selector modification = =="); 30 InspectorTest.addResult("=== After non-affecting selector modification = ==");
31 InspectorTest.dumpSelectedElementStyles(true); 31 InspectorTest.dumpSelectedElementStyles(true);
32 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[ 0][2]; 32 var section = WebInspector.inspectorView.panel("elements").sidebarPanes. styles.sections[0][2];
33 section.startEditingSelector(); 33 section.startEditingSelector();
34 section._selectorElement.textContent = "#inspectedChanged"; 34 section._selectorElement.textContent = "#inspectedChanged";
35 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Ent er")); 35 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Ent er"));
36 InspectorTest.runAfterPendingDispatches(step3); 36 InspectorTest.runAfterPendingDispatches(step3);
37 } 37 }
38 38
39 function step3() 39 function step3()
40 { 40 {
41 InspectorTest.addResult("=== After affecting selector modification ===") ; 41 InspectorTest.addResult("=== After affecting selector modification ===") ;
42 InspectorTest.dumpSelectedElementStyles(true); 42 InspectorTest.dumpSelectedElementStyles(true);
43 InspectorTest.completeTest(); 43 InspectorTest.completeTest();
44 } 44 }
45 } 45 }
46 46
47 </script> 47 </script>
48 </head> 48 </head>
49 49
50 <body onload="runTest()"> 50 <body onload="runTest()">
51 <p> 51 <p>
52 Tests that renaming a selector updates element styles. <a href="https://bugs.web kit.org/show_bug.cgi?id=70018">Bug 70018</a>. 52 Tests that renaming a selector updates element styles. <a href="https://bugs.web kit.org/show_bug.cgi?id=70018">Bug 70018</a>.
53 </p> 53 </p>
54 54
55 <div id="inspected" style="color: red">Text</div> 55 <div id="inspected" style="color: red">Text</div>
56 <div id="other"></div> 56 <div id="other"></div>
57 57
58 </body> 58 </body>
59 </html> 59 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698