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

Side by Side Diff: LayoutTests/inspector/elements/styles/styles-add-new-rule-colon.html

Issue 441873010: DevTools: [SSP] Implement adding new rule in user stylesheet (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix compilation error Created 6 years, 4 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 if (!window.eventSender || !window.textInputController) { 9 if (!window.eventSender || !window.textInputController) {
10 document.write("This test does not work in manual mode."); 10 document.write("This test does not work in manual mode.");
(...skipping 26 matching lines...) Expand all
37 InspectorTest.runAfterPendingDispatches(step3); 37 InspectorTest.runAfterPendingDispatches(step3);
38 } 38 }
39 39
40 function step3() { 40 function step3() {
41 InspectorTest.selectNodeAndWaitForStyles("other", step4); 41 InspectorTest.selectNodeAndWaitForStyles("other", step4);
42 } 42 }
43 43
44 function step4() 44 function step4()
45 { 45 {
46 // Click "Add new rule". 46 // Click "Add new rule".
47 document.getElementById("add-style-button-test-id").click(); 47 InspectorTest.addNewRule(null, onRuleAdded);
48 InspectorTest.selectNodeAndWaitForStyles("inspected", step5); 48
49 function onRuleAdded()
50 {
51 InspectorTest.selectNodeAndWaitForStyles("inspected", step5);
52 }
49 } 53 }
50 54
51 function step5() 55 function step5()
52 { 56 {
53 InspectorTest.addResult("After adding new rule (inspected):"); 57 InspectorTest.addResult("After adding new rule (inspected):");
54 InspectorTest.dumpSelectedElementStyles(true, false, true, true); 58 InspectorTest.dumpSelectedElementStyles(true, false, true, true);
55 InspectorTest.selectNodeAndWaitForStyles("other", step6); 59 InspectorTest.selectNodeAndWaitForStyles("other", step6);
56 } 60 }
57 61
58 function step6() 62 function step6()
(...skipping 15 matching lines...) Expand all
74 <body onload="runTest()"> 78 <body onload="runTest()">
75 <p> 79 <p>
76 Tests that adding a new rule works after switching nodes. 80 Tests that adding a new rule works after switching nodes.
77 </p> 81 </p>
78 82
79 <div id="inspected" style="font-size: 12px">Text</div> 83 <div id="inspected" style="font-size: 12px">Text</div>
80 <div id="other" style="color:red"></div> 84 <div id="other" style="color:red"></div>
81 85
82 </body> 86 </body>
83 </html> 87 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698