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 addStyleClass() | 7 function addStyleClass() |
8 { | 8 { |
9 document.getElementById("inspected").className = "new-class"; | 9 document.getElementById("inspected").className = "new-class"; |
10 } | 10 } |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 function rebuildUpdate() | 27 function rebuildUpdate() |
28 { | 28 { |
29 if (WebInspector.panels.elements.sidebarPanes.styles.node === treeOutlin
e.selectedDOMNode()) | 29 if (WebInspector.panels.elements.sidebarPanes.styles.node === treeOutlin
e.selectedDOMNode()) |
30 seenRebuildUpdate = true; | 30 seenRebuildUpdate = true; |
31 } | 31 } |
32 | 32 |
33 function step1() | 33 function step1() |
34 { | 34 { |
35 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_reb
uildUpdate", rebuildUpdate); | 35 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_reb
uildUpdate", rebuildUpdate); |
36 WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.Attr
Modified, attributeChanged, this); | 36 WebInspector.domModel.addEventListener(WebInspector.DOMModel.Events.Attr
Modified, attributeChanged, this); |
37 // Click "Add new rule". | 37 // Click "Add new rule". |
38 document.getElementById("add-style-button-test-id").click(); | 38 document.getElementById("add-style-button-test-id").click(); |
39 InspectorTest.evaluateInPage("addStyleClass()", step2); | 39 InspectorTest.evaluateInPage("addStyleClass()", step2); |
40 } | 40 } |
41 | 41 |
42 function step2() | 42 function step2() |
43 { | 43 { |
44 if (!seenAttrModified) | 44 if (!seenAttrModified) |
45 InspectorTest.addResult("FAIL: AttrModified event not received."); | 45 InspectorTest.addResult("FAIL: AttrModified event not received."); |
46 else if (seenRebuildUpdate) | 46 else if (seenRebuildUpdate) |
(...skipping 14 matching lines...) Expand all Loading... |
61 | 61 |
62 <body onload="runTest()"> | 62 <body onload="runTest()"> |
63 <p> | 63 <p> |
64 Tests that modification of element styles while editing a selector does not comm
it the editor. | 64 Tests that modification of element styles while editing a selector does not comm
it the editor. |
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 |