OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <link rel="stylesheet" href="resources/import-pseudoclass-crash.css"> | |
4 <script src="../../../http/tests/inspector/inspector-test.js"></script> | |
5 <script src="../../../http/tests/inspector/elements-test.js"></script> | |
6 <script> | |
7 | |
8 function test() | |
9 { | |
10 InspectorTest.nodeWithId("lastchild", nodeFound); | |
11 | |
12 function nodeFound(node) | |
13 { | |
14 InspectorTest.cssModel.getMatchedStylesAsync(node.id, true, false, match
edStylesCallback); | |
15 } | |
16 | |
17 var styleSheetId; | |
18 | |
19 function matchedStylesCallback(styles) | |
20 { | |
21 styleSheetId = styles.matchedCSSRules[1].styleSheetId; | |
22 InspectorTest.CSSAgent.setStyleSheetText(styleSheetId, | |
23 "@import url(\"import-pseudoclass-crash-empty.css\");\n\n:last-child
{ color: #000001; }\n", modifiedCallback); | |
24 } | |
25 | |
26 function modifiedCallback() | |
27 { | |
28 InspectorTest.CSSAgent.setStyleSheetText(styleSheetId, "@import url(\"im
port-pseudoclass-crash-empty.css\");\n\n:last-child { color: #002001; }\n", modi
fiedCallback2); | |
29 } | |
30 | |
31 function modifiedCallback2() | |
32 { | |
33 InspectorTest.completeTest(); | |
34 } | |
35 } | |
36 | |
37 </script> | |
38 </head> | |
39 | |
40 <body onload="runTest()"> | |
41 <p> | |
42 Tests that modifying stylesheet text with @import and :last-child selector does
not crash (<a href="https://bugs.webkit.org/show_bug.cgi?id=95324">Bug 95324</a>
). | |
43 </p> | |
44 | |
45 <div> | |
46 <p id="lastchild">:last-child</p> | |
47 </div> | |
48 </body> | |
49 </html> | |
OLD | NEW |