Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / elements / styles-1 / css-live-edit.html
blobf43ae42a4040dd1d30f90794f3be194a2fbf5350
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="../styles/resources/css-live-edit.css">
8 <div id=foo></div>
9 <script>
11 function test()
13 InspectorTest.runTestSuite([
14 function testLiveEdit(next)
16 InspectorTest.showScriptSource("css-live-edit.css", didShowResource);
18 function didShowResource(sourceFrame)
20 InspectorTest.addSniffer(WebInspector.CSSStyleModel.prototype, "_fireStyleSheetChanged", didEditResource);
21 InspectorTest.replaceInSource(sourceFrame, "font-size: 12px;", "font-size: 20px;");
24 function didEditResource()
26 InspectorTest.selectNodeAndWaitForStylesWithComputed("foo", didSelectElement);
29 function didSelectElement()
31 InspectorTest.dumpSelectedElementStyles(false, true);
32 next();
35 ]);
38 </script>
40 </head>
42 <body onload="runTest()">
43 <p>Tests that styles are updated when live-editing css resource.</p>
45 </body>
46 </html>