Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / elements / styles / removed-rule-crash.html
1 <html>
2 <head>
3 <style>
4 #container {
5     font-weight: bold;
6 }
7 </style>
8 <script src="../../../http/tests/inspector/inspector-test.js"></script>
9 <script src="../../../http/tests/inspector/elements-test.js"></script>
10 <script>
11
12 function removeRule()
13 {
14     document.styleSheets[0].removeRule(0);
15 }
16
17 function test()
18 {
19     InspectorTest.selectNodeAndWaitForStyles("container", step0);
20
21     function step0(node)
22     {
23         InspectorTest.evaluateInPage("removeRule()", step1);
24     }
25
26     function step1()
27     {
28         InspectorTest.addResult("Before disable");
29         InspectorTest.dumpSelectedElementStyles(true);
30         InspectorTest.toggleMatchedStyleProperty("font-weight", false);
31         InspectorTest.waitForStyleApplied(step2);
32     }
33
34     function step2()
35     {
36         InspectorTest.addResult("PASS: No crash");
37         InspectorTest.completeTest();
38     }
39 }
40 </script>
41 </head>
42
43 <body onload="runTest()">
44 <p>
45 Tests that disabling style property after the style rule has been removed does not crash the inspected page.
46 </p>
47
48 <div id="container">
49 </div>
50
51 </body>
52 </html>