| OLD | NEW |
| (Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../../http/tests/inspector/elements-test.js"></script> |
| 5 <script src="./styles-update-links.js"></script> |
| 6 <style> |
| 7 #pseudo::after { |
| 8 pseudo-property: "12"; |
| 9 color: red; |
| 10 } |
| 11 |
| 12 #pseudo::after { |
| 13 border: 1px solid black; |
| 14 } |
| 15 |
| 16 #pseudo::before { |
| 17 color: blue; |
| 18 } |
| 19 </style> |
| 20 <script> |
| 21 |
| 22 function test() |
| 23 { |
| 24 InspectorTest.runTestSuite([ |
| 25 function selectInitialNode(next) |
| 26 { |
| 27 InspectorTest.selectNodeAndWaitForStyles("container", next); |
| 28 }, |
| 29 |
| 30 function testEditSelector(next) |
| 31 { |
| 32 var section = WebInspector.panels.elements.sidebarPanes.styles._sect
ionBlocks[0].sections[3]; |
| 33 section.startEditingSelector(); |
| 34 section._selectorElement.textContent = ".should-change, .INSERTED-OT
HER-SELECTOR"; |
| 35 InspectorTest.waitForSelectorCommitted(onSelectorEdited); |
| 36 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent(
"Enter")); |
| 37 |
| 38 function onSelectorEdited() |
| 39 { |
| 40 InspectorTest.addResult("\n\n#### AFTER SELECTOR EDIT ####\n\n")
; |
| 41 InspectorTest.dumpSelectedElementStyles(true, false, true); |
| 42 var rules = InspectorTest.getMatchedRules(); |
| 43 InspectorTest.validateRuleRanges("container", rules, next); |
| 44 } |
| 45 } |
| 46 ]); |
| 47 } |
| 48 </script> |
| 49 <link rel="stylesheet" href="../styles/resources/styles-update-links-2.css"></li
nk> |
| 50 <link rel="stylesheet" href="../styles/resources/styles-update-links.css"></link
> |
| 51 </head> |
| 52 |
| 53 <body onload="runTest()"> |
| 54 <p> |
| 55 Tests that links are updated properly when editing selector. |
| 56 </p> |
| 57 |
| 58 <div id="container" class="left-intact should-change"> |
| 59 Red text here. |
| 60 </div> |
| 61 |
| 62 <div id="other"></div> |
| 63 |
| 64 <section id="pseudo"></div> |
| 65 |
| 66 </body> |
| 67 </html> |
| OLD | NEW |