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

Side by Side Diff: LayoutTests/inspector/elements/styles/styles-add-blank-property.html

Issue 268293003: DevTools: Get rid of WebInspector.panels (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 <script> 5 <script>
6 6
7 function test() 7 function test()
8 { 8 {
9 WebInspector.inspectorView.showPanel("elements"); 9 WebInspector.inspectorView.showPanel("elements");
10 InspectorTest.selectNodeAndWaitForStyles("inspected", addAndIncrementFirstPr operty); 10 InspectorTest.selectNodeAndWaitForStyles("inspected", addAndIncrementFirstPr operty);
11 11
12 var treeElement; 12 var treeElement;
13 var section; 13 var section;
14 14
15 function addAndIncrementFirstProperty() 15 function addAndIncrementFirstProperty()
16 { 16 {
17 InspectorTest.addResult("Before append:"); 17 InspectorTest.addResult("Before append:");
18 InspectorTest.dumpSelectedElementStyles(true); 18 InspectorTest.dumpSelectedElementStyles(true);
19 section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][1 ]; 19 section = WebInspector.inspectorView.panel("elements").sidebarPanes.styl es.sections[0][1];
20 section.expand(); 20 section.expand();
21 21
22 // Create and increment. 22 // Create and increment.
23 treeElement = section.addNewBlankProperty(0); 23 treeElement = section.addNewBlankProperty(0);
24 treeElement.startEditing(); 24 treeElement.startEditing();
25 treeElement.nameElement.textContent = "margin-left"; 25 treeElement.nameElement.textContent = "margin-left";
26 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente r")); 26 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente r"));
27 27
28 treeElement.valueElement.textContent = "1px"; 28 treeElement.valueElement.textContent = "1px";
29 treeElement.valueElement.firstChild.select(); 29 treeElement.valueElement.firstChild.select();
(...skipping 13 matching lines...) Expand all
43 // Commit. 43 // Commit.
44 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente r")); 44 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente r"));
45 reloadStyles(addAndChangeLastCompoundProperty); 45 reloadStyles(addAndChangeLastCompoundProperty);
46 } 46 }
47 47
48 function addAndChangeLastCompoundProperty() 48 function addAndChangeLastCompoundProperty()
49 { 49 {
50 InspectorTest.addResult("After insertion at index 0:"); 50 InspectorTest.addResult("After insertion at index 0:");
51 InspectorTest.dumpSelectedElementStyles(true); 51 InspectorTest.dumpSelectedElementStyles(true);
52 52
53 treeElement = WebInspector.panels.elements.sidebarPanes.styles.sections[ 0][1].addNewBlankProperty(2); 53 treeElement = WebInspector.inspectorView.panel("elements").sidebarPanes. styles.sections[0][1].addNewBlankProperty(2);
54 treeElement.startEditing(); 54 treeElement.startEditing();
55 treeElement.nameElement.textContent = "color"; 55 treeElement.nameElement.textContent = "color";
56 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente r")); 56 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente r"));
57 57
58 treeElement.valueElement.textContent = "green; font-weight: bold"; 58 treeElement.valueElement.textContent = "green; font-weight: bold";
59 treeElement.kickFreeFlowStyleEditForTest(); 59 treeElement.kickFreeFlowStyleEditForTest();
60 60
61 treeElement.valueElement.textContent = "red; font-weight: bold"; 61 treeElement.valueElement.textContent = "red; font-weight: bold";
62 treeElement.kickFreeFlowStyleEditForTest(); 62 treeElement.kickFreeFlowStyleEditForTest();
63 63
64 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Ent er")); 64 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Ent er"));
65 InspectorTest.runAfterPendingDispatches(reloadStyles.bind(this, addAndCo mmitMiddleProperty)); 65 InspectorTest.runAfterPendingDispatches(reloadStyles.bind(this, addAndCo mmitMiddleProperty));
66 } 66 }
67 67
68 function addAndCommitMiddleProperty() 68 function addAndCommitMiddleProperty()
69 { 69 {
70 InspectorTest.addResult("After appending and changing a 'compound' prope rty:"); 70 InspectorTest.addResult("After appending and changing a 'compound' prope rty:");
71 InspectorTest.dumpSelectedElementStyles(true); 71 InspectorTest.dumpSelectedElementStyles(true);
72 72
73 treeElement = WebInspector.panels.elements.sidebarPanes.styles.sections[ 0][1].addNewBlankProperty(2); 73 treeElement = WebInspector.inspectorView.panel("elements").sidebarPanes. styles.sections[0][1].addNewBlankProperty(2);
74 treeElement.startEditing(); 74 treeElement.startEditing();
75 treeElement.nameElement.textContent = "third-property"; 75 treeElement.nameElement.textContent = "third-property";
76 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente r")); 76 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente r"));
77 treeElement.valueElement.textContent = "third-value"; 77 treeElement.valueElement.textContent = "third-value";
78 78
79 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente r")); 79 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente r"));
80 InspectorTest.runAfterPendingDispatches(reloadStyles.bind(this, dumpAndC omplete)); 80 InspectorTest.runAfterPendingDispatches(reloadStyles.bind(this, dumpAndC omplete));
81 } 81 }
82 82
83 function dumpAndComplete() 83 function dumpAndComplete()
(...skipping 21 matching lines...) Expand all
105 <body onload="runTest()"> 105 <body onload="runTest()">
106 <p> 106 <p>
107 Tests that adding a new blank property works. 107 Tests that adding a new blank property works.
108 </p> 108 </p>
109 109
110 <div id="inspected" style="font-size: 12px">Text</div> 110 <div id="inspected" style="font-size: 12px">Text</div>
111 <div id="other"></div> 111 <div id="other"></div>
112 112
113 </body> 113 </body>
114 </html> 114 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698