| OLD | NEW |
| 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 WebInspector.inspectorView.showPanel("elements"); | 9 WebInspector.inspectorView.showPanel("elements"); |
| 10 var nodeId; | 10 var nodeId; |
| 11 var stylesPane; | 11 var stylesPane; |
| 12 | 12 |
| 13 InspectorTest.runTestSuite([ | 13 InspectorTest.runTestSuite([ |
| 14 function setUp(next) { | 14 function setUp(next) { |
| 15 InspectorTest.selectNodeAndWaitForStyles("inspected", next); | 15 InspectorTest.selectNodeAndWaitForStyles("inspected", next); |
| 16 }, | 16 }, |
| 17 | 17 |
| 18 function addRule(next) | 18 function addRule(next) |
| 19 { | 19 { |
| 20 InspectorTest.nodeWithId("inspected", nodeCallback); | 20 InspectorTest.nodeWithId("inspected", nodeCallback); |
| 21 | 21 |
| 22 function nodeCallback(node) | 22 function nodeCallback(node) |
| 23 { | 23 { |
| 24 nodeId = node.id; | 24 nodeId = node.id; |
| 25 stylesPane = WebInspector.panels.elements.sidebarPanes.styles; | 25 stylesPane = WebInspector.inspectorView.panel("elements").sideba
rPanes.styles; |
| 26 stylesPane.addBlankSection(); | 26 stylesPane.addBlankSection(); |
| 27 var section = stylesPane.sections[0][2]; | 27 var section = stylesPane.sections[0][2]; |
| 28 section.startEditingSelector(); | 28 section.startEditingSelector(); |
| 29 section._selectorElement.textContent = "foo, #inspected, .bar, #
inspected"; | 29 section._selectorElement.textContent = "foo, #inspected, .bar, #
inspected"; |
| 30 section._selectorElement.dispatchEvent(InspectorTest.createKeyEv
ent("Enter")); | 30 section._selectorElement.dispatchEvent(InspectorTest.createKeyEv
ent("Enter")); |
| 31 InspectorTest.runAfterPendingDispatches(callback); | 31 InspectorTest.runAfterPendingDispatches(callback); |
| 32 } | 32 } |
| 33 | 33 |
| 34 function callback() | 34 function callback() |
| 35 { | 35 { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 61 | 61 |
| 62 <body onload="runTest()"> | 62 <body onload="runTest()"> |
| 63 <p> | 63 <p> |
| 64 Tests that matching selectors are marked properly after new rule creation and se
lector change. | 64 Tests that matching selectors are marked properly after new rule creation and se
lector change. |
| 65 </p> | 65 </p> |
| 66 | 66 |
| 67 <div id="inspected"></div> | 67 <div id="inspected"></div> |
| 68 | 68 |
| 69 </body> | 69 </body> |
| 70 </html> | 70 </html> |
| OLD | NEW |