OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <style> | |
4 #inspected { | |
5 color: green; | |
6 } | |
7 </style> | |
8 <script src="../../../http/tests/inspector/inspector-test.js"></script> | |
9 <script src="../../../http/tests/inspector/elements-test.js"></script> | |
10 <script> | |
11 | |
12 function test() | |
13 { | |
14 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); | |
15 | |
16 function step1() | |
17 { | |
18 InspectorTest.addResult("=== Before selector modification ==="); | |
19 InspectorTest.dumpSelectedElementStyles(true); | |
20 var section = InspectorTest.firstMatchedStyleSection(); | |
21 section.startEditingSelector(); | |
22 section._selectorElement.textContent = "hr, #inspected "; | |
23 InspectorTest.waitForSelectorCommitted(step2); | |
24 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Ent
er")); | |
25 } | |
26 | |
27 function step2() | |
28 { | |
29 InspectorTest.addResult("=== After non-affecting selector modification =
=="); | |
30 InspectorTest.dumpSelectedElementStyles(true); | |
31 var section = InspectorTest.firstMatchedStyleSection(); | |
32 section.startEditingSelector(); | |
33 section._selectorElement.textContent = "#inspectedChanged"; | |
34 InspectorTest.waitForSelectorCommitted(step3); | |
35 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Ent
er")); | |
36 } | |
37 | |
38 function step3() | |
39 { | |
40 InspectorTest.addResult("=== After affecting selector modification ===")
; | |
41 InspectorTest.dumpSelectedElementStyles(true); | |
42 InspectorTest.completeTest(); | |
43 } | |
44 } | |
45 | |
46 </script> | |
47 </head> | |
48 | |
49 <body onload="runTest()"> | |
50 <p> | |
51 Tests that renaming a selector updates element styles. <a href="https://bugs.web
kit.org/show_bug.cgi?id=70018">Bug 70018</a>. | |
52 </p> | |
53 | |
54 <div id="inspected" style="color: red">Text</div> | |
55 <div id="other"></div> | |
56 | |
57 </body> | |
58 </html> | |
OLD | NEW |