5 <script src="../inspector-test.js"></script>
6 <script src="../elements-test.js"></script>
9 function addImportRule()
11 document.styleSheets[0].insertRule("@import url(resources/import-added-through-js-crash.css)", 0);
16 WebInspector.showPanel("elements");
17 InspectorTest.runTestSuite([
18 function selectNode(next)
20 InspectorTest.selectNodeAndWaitForStyles("inspected", next);
23 function addImportRules(next)
25 InspectorTest.waitForStyles("inspected", callback);
26 InspectorTest.evaluateInPage("addImportRule()");
30 InspectorTest.waitForStyles("inspected", next);
31 InspectorTest.evaluateInPage("addImportRule()");
40 <body onload="runTest()">
42 Tests that adding @import rules into a stylesheet through JavaScript does not crash the inspected page.
46 <p id="inspected"></p>