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="../../../http/tests/inspector/live-edit-test.js"></script> | |
6 <script src="../../../http/tests/inspector/debugger-test.js"></script> | |
7 <link rel="stylesheet" href="resources/css-live-edit.css"> | |
8 <div id=foo></div> | |
9 <script> | |
10 | |
11 function test() | |
12 { | |
13 InspectorTest.runTestSuite([ | |
14 function testLiveEdit(next) | |
15 { | |
16 InspectorTest.showScriptSource("css-live-edit.css", didShowResource)
; | |
17 | |
18 function didShowResource(sourceFrame) | |
19 { | |
20 InspectorTest.addSniffer(WebInspector.CSSStyleModel.prototype, "
_fireStyleSheetChanged", didEditResource); | |
21 InspectorTest.replaceInSource(sourceFrame, "font-size: 12px;", "
font-size: 20px;"); | |
22 } | |
23 | |
24 function didEditResource() | |
25 { | |
26 InspectorTest.selectNodeAndWaitForStylesWithComputed("foo", didS
electElement); | |
27 } | |
28 | |
29 function didSelectElement() | |
30 { | |
31 InspectorTest.dumpSelectedElementStyles(false, true); | |
32 next(); | |
33 } | |
34 } | |
35 ]); | |
36 }; | |
37 | |
38 </script> | |
39 | |
40 </head> | |
41 | |
42 <body onload="runTest()"> | |
43 <p>Tests that styles are updated when live-editing css resource.</p> | |
44 | |
45 </body> | |
46 </html> | |
OLD | NEW |