| 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 testSetNewValue() | 7 function testSetNewValue() |
| 8 { | 8 { |
| 9 document.getElementById("node-set-new-value").style.setProperty("color", "bl
ue"); | 9 document.getElementById("node-set-new-value").style.setProperty("color", "bl
ue"); |
| 10 } | 10 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 InspectorTest.runTestSuite([ | 23 InspectorTest.runTestSuite([ |
| 24 function testSetUp(next) | 24 function testSetUp(next) |
| 25 { | 25 { |
| 26 InspectorTest.expandElementsTree(next); | 26 InspectorTest.expandElementsTree(next); |
| 27 }, | 27 }, |
| 28 | 28 |
| 29 function testSetNewValue(next) | 29 function testSetNewValue(next) |
| 30 { | 30 { |
| 31 InspectorTest.evaluateInPage("testSetNewValue()"); | 31 InspectorTest.evaluateInPage("testSetNewValue()"); |
| 32 | 32 |
| 33 WebInspector.domModel.addEventListener(WebInspector.DOMModel.Events.
AttrModified, listener); | 33 InspectorTest.domModel.addEventListener(WebInspector.DOMModel.Events
.AttrModified, listener); |
| 34 function listener(event) | 34 function listener(event) |
| 35 { | 35 { |
| 36 InspectorTest.addResult("WebInspector.DOMModel.Events.AttrModifi
ed should be issued"); | 36 InspectorTest.addResult("WebInspector.DOMModel.Events.AttrModifi
ed should be issued"); |
| 37 WebInspector.domModel.removeEventListener(WebInspector.DOMModel.
Events.AttrModified, listener); | 37 InspectorTest.domModel.removeEventListener(WebInspector.DOMModel
.Events.AttrModified, listener); |
| 38 next(); | 38 next(); |
| 39 } | 39 } |
| 40 }, | 40 }, |
| 41 | 41 |
| 42 function testSetSameValue(next) | 42 function testSetSameValue(next) |
| 43 { | 43 { |
| 44 InspectorTest.evaluateInPage("testSetSameValue()"); | 44 InspectorTest.evaluateInPage("testSetSameValue()"); |
| 45 | 45 |
| 46 WebInspector.domModel.addEventListener(WebInspector.DOMModel.Events.
AttrModified, listener); | 46 InspectorTest.domModel.addEventListener(WebInspector.DOMModel.Events
.AttrModified, listener); |
| 47 function listener(event) | 47 function listener(event) |
| 48 { | 48 { |
| 49 InspectorTest.addResult("WebInspector.DOMModel.Events.AttrModifi
ed should not be issued"); | 49 InspectorTest.addResult("WebInspector.DOMModel.Events.AttrModifi
ed should not be issued"); |
| 50 WebInspector.domModel.removeEventListener(WebInspector.DOMModel.
Events.AttrModified, listener); | 50 InspectorTest.domModel.removeEventListener(WebInspector.DOMModel
.Events.AttrModified, listener); |
| 51 } | 51 } |
| 52 | 52 |
| 53 InspectorTest.addSniffer(WebInspector.DOMNode.prototype, "_setAttrib
utesPayload", callback); | 53 InspectorTest.addSniffer(WebInspector.DOMNode.prototype, "_setAttrib
utesPayload", callback); |
| 54 function callback() | 54 function callback() |
| 55 { | 55 { |
| 56 InspectorTest.addResult("WebInspector.DOMNode.prototype._setAttr
ibutesPayload should be called"); | 56 InspectorTest.addResult("WebInspector.DOMNode.prototype._setAttr
ibutesPayload should be called"); |
| 57 WebInspector.domModel.removeEventListener(WebInspector.DOMModel.
Events.AttrModified, listener); | 57 InspectorTest.domModel.removeEventListener(WebInspector.DOMModel
.Events.AttrModified, listener); |
| 58 next(); | 58 next(); |
| 59 } | 59 } |
| 60 } | 60 } |
| 61 ]); | 61 ]); |
| 62 } | 62 } |
| 63 | 63 |
| 64 </script> | 64 </script> |
| 65 </head> | 65 </head> |
| 66 | 66 |
| 67 <body onload="runTest()"> | 67 <body onload="runTest()"> |
| 68 <p> | 68 <p> |
| 69 Tests that style modification generates attribute updated event only when attrib
ute is actually changed. | 69 Tests that style modification generates attribute updated event only when attrib
ute is actually changed. |
| 70 </p> | 70 </p> |
| 71 | 71 |
| 72 <div id="container"> | 72 <div id="container"> |
| 73 <div id="node-set-new-value" style="color:red"></div> | 73 <div id="node-set-new-value" style="color:red"></div> |
| 74 <div id="node-set-same-value" style="color:red"></div> | 74 <div id="node-set-same-value" style="color:red"></div> |
| 75 </div> | 75 </div> |
| 76 </body> | 76 </body> |
| 77 </html> | 77 </html> |
| OLD | NEW |