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>
10 WebInspector.showPanel("elements");
11 InspectorTest.nodeWithId("lastchild", nodeFound);
13 function nodeFound(node)
15 WebInspector.cssModel.getMatchedStylesAsync(node.id, true, false, matchedStylesCallback);
20 function matchedStylesCallback(styles)
22 styleSheetId = styles.matchedCSSRules[1].id.styleSheetId;
23 CSSAgent.setStyleSheetText(styleSheetId,
24 "@import url(\"import-pseudoclass-crash-empty.css\");\n\n:last-child { color: #000001; }\n", modifiedCallback);
27 function modifiedCallback()
29 CSSAgent.setStyleSheetText(styleSheetId, "@import url(\"import-pseudoclass-crash-empty.css\");\n\n:last-child { color: #002001; }\n", modifiedCallback2);
32 function modifiedCallback2()
34 InspectorTest.completeTest();
41 <body onload="runTest()">
43 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>).
47 <p id="lastchild">:last-child</p>