3 <link rel=
"stylesheet" href=
"../styles/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 InspectorTest
.nodeWithId("lastchild", nodeFound
);
12 function nodeFound(node
)
14 InspectorTest
.cssModel
.matchedStylesPromise(node
.id
, true, false).then(matchedStylesCallback
);
19 function matchedStylesCallback(styles
)
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").then(modifiedCallback
);
26 function modifiedCallback()
28 InspectorTest
.CSSAgent
.setStyleSheetText(styleSheetId
, "@import url(\"import-pseudoclass-crash-empty.css\");\n\n:last-child { color: #002001; }\n").then(modifiedCallback2
);
31 function modifiedCallback2()
33 InspectorTest
.completeTest();
40 <body onload=
"runTest()">
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>).
46 <p id=
"lastchild">:last-child
</p>