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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/styles-2/page-reload-update-sidebar.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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
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 <script> 5 <script>
6 6
7 function removeInspectedNode() 7 function removeInspectedNode()
8 { 8 {
9 document.querySelector("#inspected").remove(); 9 document.querySelector("#inspected").remove();
10 } 10 }
11 11
12 function test() 12 function test()
13 { 13 {
14 var stylesSidebarPane = WebInspector.panels.elements._stylesWidget; 14 var stylesSidebarPane = UI.panels.elements._stylesWidget;
15 InspectorTest.runTestSuite([ 15 InspectorTest.runTestSuite([
16 function selectInspectedNode(next) 16 function selectInspectedNode(next)
17 { 17 {
18 InspectorTest.selectNodeAndWaitForStyles("inspected", next); 18 InspectorTest.selectNodeAndWaitForStyles("inspected", next);
19 }, 19 },
20 20
21 function startEditingAndReloadPage(next) 21 function startEditingAndReloadPage(next)
22 { 22 {
23 var treeElement = InspectorTest.getElementStylePropertyTreeItem("col or"); 23 var treeElement = InspectorTest.getElementStylePropertyTreeItem("col or");
24 var currentDocumentId = stylesSidebarPane.node().ownerDocument.id; 24 var currentDocumentId = stylesSidebarPane.node().ownerDocument.id;
25 treeElement.startEditing(treeElement.valueElement); 25 treeElement.startEditing(treeElement.valueElement);
26 var nodeRebuiltHappened = false; 26 var nodeRebuiltHappened = false;
27 var pageReloadHappened = false; 27 var pageReloadHappened = false;
28 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, " _nodeStylesUpdatedForTest", onNodeRebuilt); 28 InspectorTest.addSniffer(Elements.StylesSidebarPane.prototype, "_nod eStylesUpdatedForTest", onNodeRebuilt);
29 InspectorTest.reloadPage(reloadedCallback); 29 InspectorTest.reloadPage(reloadedCallback);
30 30
31 function onNodeRebuilt(node, rebuild) 31 function onNodeRebuilt(node, rebuild)
32 { 32 {
33 if (!node || node.ownerDocument.id === currentDocumentId) { 33 if (!node || node.ownerDocument.id === currentDocumentId) {
34 InspectorTest.addResult("ERROR: A rebuild update happened fo r the same node."); 34 InspectorTest.addResult("ERROR: A rebuild update happened fo r the same node.");
35 InspectorTest.completeTest(); 35 InspectorTest.completeTest();
36 return; 36 return;
37 } 37 }
38 nodeRebuiltHappened = true; 38 nodeRebuiltHappened = true;
(...skipping 29 matching lines...) Expand all
68 </head> 68 </head>
69 69
70 <body onload="runTest()"> 70 <body onload="runTest()">
71 <p> 71 <p>
72 Tests that reloading page during styles sidebar pane editing cancels editing and re-renders the 72 Tests that reloading page during styles sidebar pane editing cancels editing and re-renders the
73 sidebar pane. 73 sidebar pane.
74 </p> 74 </p>
75 <div id="inspected" style="color: blue">Text</div> 75 <div id="inspected" style="color: blue">Text</div>
76 </body> 76 </body>
77 </html> 77 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698