Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Side by Side Diff: LayoutTests/inspector/elements/inline-style-title.html

Issue 218703002: DevTools: [wip] move Elements panel off WebInspector.domModel and single tree outline. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review comment addressed (and much more) Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/elements-test.js"></script> 4 <script src="../../http/tests/inspector/elements-test.js"></script>
5 <style id="inline-style"> 5 <style id="inline-style">
6 div { color: red } 6 div { color: red }
7 </style> 7 </style>
8 <script> 8 <script>
9 9
10 function updateStyleText() 10 function updateStyleText()
11 { 11 {
12 document.querySelector("#inline-style").textContent = "span { border: 1px so lid black }"; 12 document.querySelector("#inline-style").textContent = "span { border: 1px so lid black }";
13 } 13 }
14 14
15 function test() 15 function test()
16 { 16 {
17 // Save time on style updates. 17 // Save time on style updates.
18 WebInspector.StylesSidebarPane.prototype.update = function() {}; 18 WebInspector.StylesSidebarPane.prototype.update = function() {};
19 WebInspector.MetricsSidebarPane.prototype.update = function() {}; 19 WebInspector.MetricsSidebarPane.prototype.update = function() {};
20 20
21 InspectorTest.nodeWithId("inline-style", onInlineStyleQueried); 21 InspectorTest.nodeWithId("inline-style", onInlineStyleQueried);
22 22
23 var treeOutline = WebInspector.panels.elements.treeOutline; 23 var treeOutline = InspectorTest.firstElementsTreeOutline();
24 var treeElement; 24 var treeElement;
25 25
26 function onInlineStyleQueried(node) 26 function onInlineStyleQueried(node)
27 { 27 {
28 if (!node) { 28 if (!node) {
29 InspectorTest.addResult("Didn't find node with given ID"); 29 InspectorTest.addResult("Didn't find node with given ID");
30 InspectorTest.completeTest(); 30 InspectorTest.completeTest();
31 return; 31 return;
32 } 32 }
33 treeElement = treeOutline.findTreeElement(node); 33 treeElement = treeOutline.findTreeElement(node);
34 InspectorTest.addResult("=== initial inline style text ==="); 34 InspectorTest.addResult("=== initial inline style text ===");
35 InspectorTest.addResult(treeElement.title.textContent); 35 InspectorTest.addResult(treeElement.title.textContent);
36 InspectorTest.evaluateInPage("updateStyleText()", onStyleUpdated); 36 InspectorTest.evaluateInPage("updateStyleText()", onStyleUpdated);
37 } 37 }
38 38
39 function onStyleUpdated() 39 function onStyleUpdated()
40 { 40 {
41 WebInspector.panels.elements.treeOutline._updateModifiedNodes(); 41 InspectorTest.firstElementsTreeOutline()._updateModifiedNodes();
42 InspectorTest.addResult("=== inline style text after change ==="); 42 InspectorTest.addResult("=== inline style text after change ===");
43 InspectorTest.addResult(treeElement.title.textContent); 43 InspectorTest.addResult(treeElement.title.textContent);
44 InspectorTest.completeTest(); 44 InspectorTest.completeTest();
45 } 45 }
46 } 46 }
47 47
48 </script> 48 </script>
49 </head> 49 </head>
50 50
51 <body onload="runTest()"> 51 <body onload="runTest()">
52 <p> 52 <p>
53 Verifies that external change of inline style element updates its title. 53 Verifies that external change of inline style element updates its title.
54 </p> 54 </p>
55 </div> 55 </div>
56 </body> 56 </body>
57 </html> 57 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698