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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/styles-3/styles-add-new-rule.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 var initialize_AdditionalPreload = function() { 7 var initialize_AdditionalPreload = function() {
8 InspectorTest.preloadModule("source_frame"); 8 InspectorTest.preloadModule("source_frame");
9 } 9 }
10 10
11 function test() 11 function test()
12 { 12 {
13 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); 13 InspectorTest.selectNodeAndWaitForStyles("inspected", step1);
14 14
15 var treeElement; 15 var treeElement;
16 var hasResourceChanged; 16 var hasResourceChanged;
17 17
18 var revisionAdded = false; 18 var revisionAdded = false;
19 var testFinished = false; 19 var testFinished = false;
20 var displayName = null; 20 var displayName = null;
21 21
22 InspectorTest.addSniffer(WebInspector.UISourceCode.prototype, "addRevision", onRevisionAdded); 22 InspectorTest.addSniffer(Workspace.UISourceCode.prototype, "addRevision", on RevisionAdded);
23 23
24 function step1() 24 function step1()
25 { 25 {
26 // Click "Add new rule". 26 // Click "Add new rule".
27 InspectorTest.addNewRule("foo, div#inspected, bar", step2); 27 InspectorTest.addNewRule("foo, div#inspected, bar", step2);
28 } 28 }
29 29
30 function step2() 30 function step2()
31 { 31 {
32 var section = InspectorTest.firstMatchedStyleSection(); 32 var section = InspectorTest.firstMatchedStyleSection();
(...skipping 26 matching lines...) Expand all
59 59
60 function step5() 60 function step5()
61 { 61 {
62 InspectorTest.addResult("After adding new rule (other):"); 62 InspectorTest.addResult("After adding new rule (other):");
63 InspectorTest.dumpSelectedElementStyles(true, false, true); 63 InspectorTest.dumpSelectedElementStyles(true, false, true);
64 64
65 InspectorTest.waitForStylesForClass("my-class", onStylesReceived); 65 InspectorTest.waitForStylesForClass("my-class", onStylesReceived);
66 InspectorTest.nodeWithClass("my-class", onNodeFound); 66 InspectorTest.nodeWithClass("my-class", onNodeFound);
67 function onNodeFound(node) 67 function onNodeFound(node)
68 { 68 {
69 WebInspector.Revealer.reveal(node); 69 Common.Revealer.reveal(node);
70 } 70 }
71 71
72 function onStylesReceived() 72 function onStylesReceived()
73 { 73 {
74 InspectorTest.addNewRule(null, step6); 74 InspectorTest.addNewRule(null, step6);
75 } 75 }
76 } 76 }
77 77
78 function step6() 78 function step6()
79 { 79 {
80 InspectorTest.dumpSelectedElementStyles(true, false, true); 80 InspectorTest.dumpSelectedElementStyles(true, false, true);
81 81
82 InspectorTest.waitForStylesForClass("class-1", onStylesReceived); 82 InspectorTest.waitForStylesForClass("class-1", onStylesReceived);
83 InspectorTest.nodeWithClass("class-1", onNodeFound); 83 InspectorTest.nodeWithClass("class-1", onNodeFound);
84 function onNodeFound(node) 84 function onNodeFound(node)
85 { 85 {
86 WebInspector.Revealer.reveal(node); 86 Common.Revealer.reveal(node);
87 } 87 }
88 88
89 function onStylesReceived() 89 function onStylesReceived()
90 { 90 {
91 InspectorTest.addNewRule(null, function() { 91 InspectorTest.addNewRule(null, function() {
92 InspectorTest.dumpSelectedElementStyles(true, false, true); 92 InspectorTest.dumpSelectedElementStyles(true, false, true);
93 testFinished = true; 93 testFinished = true;
94 maybeCompleteTest(); 94 maybeCompleteTest();
95 }); 95 });
96 } 96 }
(...skipping 28 matching lines...) Expand all
125 <div> 125 <div>
126 <div class="my-class"></div> 126 <div class="my-class"></div>
127 <div class="my-class"></div> 127 <div class="my-class"></div>
128 <div class="my-class"></div> 128 <div class="my-class"></div>
129 </div> 129 </div>
130 130
131 <div class=" class-1 class-2 class-3 "></div> 131 <div class=" class-1 class-2 class-3 "></div>
132 132
133 </body> 133 </body>
134 </html> 134 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698