3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../http/tests/inspector/elements-test.js"></script>
5 <style id=
"inline-style">
10 function updateStyleText()
12 document
.querySelector("#inline-style").textContent
= "span { border: 1px solid black }";
17 // Save time on style updates.
18 WebInspector
.StylesSidebarPane
.prototype.update = function() {};
19 WebInspector
.MetricsSidebarPane
.prototype.update = function() {};
21 InspectorTest
.nodeWithId("inline-style", onInlineStyleQueried
);
23 var treeOutline
= InspectorTest
.firstElementsTreeOutline();
26 function onInlineStyleQueried(node
)
29 InspectorTest
.addResult("Didn't find node with given ID");
30 InspectorTest
.completeTest();
33 treeElement
= treeOutline
.findTreeElement(node
);
34 InspectorTest
.addResult("=== initial inline style text ===");
35 InspectorTest
.addResult(treeElement
.title
.textContent
);
36 InspectorTest
.evaluateInPage("updateStyleText()", onStyleUpdated
);
39 function onStyleUpdated()
41 InspectorTest
.firstElementsTreeOutline().runPendingUpdates();
42 InspectorTest
.addResult("=== inline style text after change ===");
43 InspectorTest
.addResult(treeElement
.title
.textContent
);
44 InspectorTest
.completeTest();
51 <body onload=
"runTest()">
53 Verifies that external change of inline style element updates its title.