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

Side by Side Diff: LayoutTests/inspector/elements/styles/add-new-rule-with-style-after-body.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 function addStyle() 6 function addStyle()
7 { 7 {
8 var style = document.createElement("style"); 8 var style = document.createElement("style");
9 document.documentElement.appendChild(style); 9 document.documentElement.appendChild(style);
10 style.sheet.insertRule("foo {display: none;}", 0); 10 style.sheet.insertRule("foo {display: none;}", 0);
(...skipping 11 matching lines...) Expand all
22 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); 22 InspectorTest.selectNodeAndWaitForStyles("inspected", step1);
23 } 23 }
24 24
25 var treeElement; 25 var treeElement;
26 var hasResourceChanged; 26 var hasResourceChanged;
27 27
28 function step1() 28 function step1()
29 { 29 {
30 // Click "Add new rule". 30 // Click "Add new rule".
31 document.getElementById("add-style-button-test-id").click(); 31 document.getElementById("add-style-button-test-id").click();
32 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[ 0][2]; 32 var section = WebInspector.inspectorView.panel("elements").sidebarPanes. styles.sections[0][2];
33 section._selectorElement.textContent = "inspected"; 33 section._selectorElement.textContent = "inspected";
34 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Ent er")); 34 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Ent er"));
35 InspectorTest.runAfterPendingDispatches(step2); 35 InspectorTest.runAfterPendingDispatches(step2);
36 } 36 }
37 37
38 function step2() 38 function step2()
39 { 39 {
40 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[ 0][2]; 40 var section = WebInspector.inspectorView.panel("elements").sidebarPanes. styles.sections[0][2];
41 var newProperty = section.addNewBlankProperty(); 41 var newProperty = section.addNewBlankProperty();
42 newProperty.startEditing(); 42 newProperty.startEditing();
43 newProperty.nameElement.textContent = "color"; 43 newProperty.nameElement.textContent = "color";
44 newProperty.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente r")); 44 newProperty.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente r"));
45 newProperty.valueElement.textContent = "maroon"; 45 newProperty.valueElement.textContent = "maroon";
46 newProperty.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Ent er")); 46 newProperty.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Ent er"));
47 InspectorTest.waitForStyles("inspected", step3); 47 InspectorTest.waitForStyles("inspected", step3);
48 } 48 }
49 49
50 function step3() 50 function step3()
51 { 51 {
52 InspectorTest.addResult("After adding new rule:"); 52 InspectorTest.addResult("After adding new rule:");
53 InspectorTest.dumpSelectedElementStyles(true, false, true); 53 InspectorTest.dumpSelectedElementStyles(true, false, true);
54 InspectorTest.completeTest(); 54 InspectorTest.completeTest();
55 } 55 }
56 } 56 }
57 57
58 </script> 58 </script>
59 </head> 59 </head>
60 60
61 <body onload="runTest()"> 61 <body onload="runTest()">
62 <p> 62 <p>
63 Tests that adding a new rule works when there is a STYLE element after BODY. TIM EOUT SHOULD NOT OCCUR! <a href="https://bugs.webkit.org/show_bug.cgi?id=111299"> Bug 111299</a> 63 Tests that adding a new rule works when there is a STYLE element after BODY. TIM EOUT SHOULD NOT OCCUR! <a href="https://bugs.webkit.org/show_bug.cgi?id=111299"> Bug 111299</a>
64 </p> 64 </p>
65 65
66 <div id="inspected" style="font-size: 12px">Text</div> 66 <div id="inspected" style="font-size: 12px">Text</div>
67 67
68 </body> 68 </body>
69 </html> 69 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698