8 <script src="../../http/tests/inspector/inspector-test.js"></script>
9 <script src="../../http/tests/inspector/elements-test.js"></script>
14 WebInspector.showPanel("elements");
15 InspectorTest.selectNodeAndWaitForStyles("inspected", updateStyleText);
17 function updateStyleText()
19 InspectorTest.addResult("Before setStyleText:");
20 InspectorTest.dumpSelectedElementStyles(true);
21 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][2];
22 section.rule.style.setText("color: red");
23 InspectorTest.runAfterPendingDispatches(textUpdated);
26 function textUpdated()
28 InspectorTest.addResult("After setStyleText:");
29 InspectorTest.dumpSelectedElementStyles(true);
30 InspectorTest.completeTest();
37 <body onload="runTest()">
39 Tests that CSSStyleDeclaration.setText() works.
42 <div id="inspected">Text</div>