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

Side by Side Diff: LayoutTests/inspector/elements/styles/paste-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", pasteFirstProperty); 10 InspectorTest.selectNodeAndWaitForStyles("inspected", pasteFirstProperty);
11 11
12 function pasteFirstProperty() 12 function pasteFirstProperty()
13 { 13 {
14 InspectorTest.addResult("Before pasting:"); 14 InspectorTest.addResult("Before pasting:");
15 InspectorTest.dumpSelectedElementStyles(true); 15 InspectorTest.dumpSelectedElementStyles(true);
16 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[ 0][1]; 16 var section = WebInspector.inspectorView.panel("elements").sidebarPanes. styles.sections[0][1];
17 section.expand(); 17 section.expand();
18 18
19 var treeElement = section.addNewBlankProperty(0); 19 var treeElement = section.addNewBlankProperty(0);
20 pasteProperty(treeElement, "margin-left: 1px", pasteTwoProperties); 20 pasteProperty(treeElement, "margin-left: 1px", pasteTwoProperties);
21 } 21 }
22 22
23 function pasteTwoProperties() 23 function pasteTwoProperties()
24 { 24 {
25 InspectorTest.addResult("After pasting 'margin-left: 1px':"); 25 InspectorTest.addResult("After pasting 'margin-left: 1px':");
26 InspectorTest.dumpSelectedElementStyles(true); 26 InspectorTest.dumpSelectedElementStyles(true);
27 27
28 var treeElement = WebInspector.panels.elements.sidebarPanes.styles.secti ons[0][1].addNewBlankProperty(2); 28 var treeElement = WebInspector.inspectorView.panel("elements").sidebarPa nes.styles.sections[0][1].addNewBlankProperty(2);
29 pasteProperty(treeElement, "margin-top: 1px; color: red;", pasteOverExis tingProperty); 29 pasteProperty(treeElement, "margin-top: 1px; color: red;", pasteOverExis tingProperty);
30 } 30 }
31 31
32 function pasteOverExistingProperty() 32 function pasteOverExistingProperty()
33 { 33 {
34 InspectorTest.addResult("After pasting 'margin-top: 1px; color: red;':") ; 34 InspectorTest.addResult("After pasting 'margin-top: 1px; color: red;':") ;
35 InspectorTest.dumpSelectedElementStyles(true); 35 InspectorTest.dumpSelectedElementStyles(true);
36 36
37 var treeElement = InspectorTest.getElementStylePropertyTreeItem("margin- top"); 37 var treeElement = InspectorTest.getElementStylePropertyTreeItem("margin- top");
38 pasteProperty(treeElement, "foo: bar; moo: zoo", dumpAndComplete); 38 pasteProperty(treeElement, "foo: bar; moo: zoo", dumpAndComplete);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 <body onload="runTest()"> 74 <body onload="runTest()">
75 <p> 75 <p>
76 Tests that splitting properties when pasting works. 76 Tests that splitting properties when pasting works.
77 </p> 77 </p>
78 78
79 <div id="inspected" style="font-size: 12px">Text</div> 79 <div id="inspected" style="font-size: 12px">Text</div>
80 <div id="other"></div> 80 <div id="other"></div>
81 81
82 </body> 82 </body>
83 </html> 83 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698