| 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 | 5 |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 function injectStyleSheet() | 8 function injectStyleSheet() |
| 9 { | 9 { |
| 10 var styleSheet = "#container { margin: 8px }"; | 10 var styleSheet = "#container { margin: 8px }"; |
| 11 if (window.testRunner) | 11 if (window.testRunner) |
| 12 window.testRunner.injectStyleSheet(styleSheet, true); | 12 window.testRunner.injectStyleSheet(styleSheet, true); |
| 13 } | 13 } |
| 14 | 14 |
| 15 function test() | 15 function test() |
| 16 { | 16 { |
| 17 InspectorTest.evaluateInPage("injectStyleSheet()", step1); | 17 InspectorTest.selectNodeAndWaitForStyles("container", step0); |
| 18 |
| 19 function step0() |
| 20 { |
| 21 InspectorTest.evaluateInPage("injectStyleSheet()", step1); |
| 22 } |
| 23 |
| 18 function step1() | 24 function step1() |
| 19 { | 25 { |
| 20 InspectorTest.selectNodeAndWaitForStyles("container", step2); | 26 InspectorTest.waitForStyles("container", step2); |
| 21 } | 27 } |
| 22 | 28 |
| 23 function step2() | 29 function step2() |
| 24 { | 30 { |
| 25 InspectorTest.addResult("Before disable"); | 31 InspectorTest.addResult("Before disable"); |
| 26 InspectorTest.dumpSelectedElementStyles(true, false, true); | 32 InspectorTest.dumpSelectedElementStyles(true, false, true); |
| 27 InspectorTest.toggleStyleProperty("margin", false); | 33 InspectorTest.toggleStyleProperty("margin", false); |
| 28 InspectorTest.waitForStyles("container", step3); | 34 InspectorTest.waitForStyles("container", step3); |
| 29 } | 35 } |
| 30 | 36 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 48 | 54 |
| 49 <body onload="runTest()" id="body-id"> | 55 <body onload="runTest()" id="body-id"> |
| 50 <p> | 56 <p> |
| 51 Tests that disabling shorthand removes the "overriden" mark from the UA shorthan
d it overrides. | 57 Tests that disabling shorthand removes the "overriden" mark from the UA shorthan
d it overrides. |
| 52 </p> | 58 </p> |
| 53 | 59 |
| 54 <div id="container" style="margin: 10px"></div> | 60 <div id="container" style="margin: 10px"></div> |
| 55 | 61 |
| 56 </body> | 62 </body> |
| 57 </html> | 63 </html> |
| OLD | NEW |