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

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

Issue 881263002: DevTools: use target-based model accessors only. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 src="styles-test.js"></script> 5 <script src="styles-test.js"></script>
6 <link rel="stylesheet" href="resources/different-rule-types.css"> 6 <link rel="stylesheet" href="resources/different-rule-types.css">
7 <script> 7 <script>
8 8
9 function test() 9 function test()
10 { 10 {
11 InspectorTest.selectNodeAndWaitForStyles("inspect", fetchStyleSheet); 11 InspectorTest.selectNodeAndWaitForStyles("inspect", fetchStyleSheet);
12 12
13 function fetchStyleSheet() 13 function fetchStyleSheet()
14 { 14 {
15 var styleSheets = WebInspector.cssModel.allStyleSheets(); 15 var styleSheets = InspectorTest.cssModel.allStyleSheets();
16 for (var i = 0; i < styleSheets.length; ++i) { 16 for (var i = 0; i < styleSheets.length; ++i) {
17 var styleSheetHeader = styleSheets[i]; 17 var styleSheetHeader = styleSheets[i];
18 if (styleSheetHeader.sourceURL.indexOf("different-rule-types.css") = == -1) 18 if (styleSheetHeader.sourceURL.indexOf("different-rule-types.css") = == -1)
19 continue; 19 continue;
20 InspectorTest.addNewRuleInStyleSheet(styleSheetHeader, "#other, div" , onRuleAdded); 20 InspectorTest.addNewRuleInStyleSheet(styleSheetHeader, "#other, div" , onRuleAdded);
21 return; 21 return;
22 } 22 }
23 } 23 }
24 24
25 function onRuleAdded() 25 function onRuleAdded()
(...skipping 15 matching lines...) Expand all
41 <p> 41 <p>
42 Tests that adding new rule in the stylesheet end works as expected. 42 Tests that adding new rule in the stylesheet end works as expected.
43 </p> 43 </p>
44 44
45 <div class="inspected">Styled element</div> 45 <div class="inspected">Styled element</div>
46 <div id="inspect"></div> 46 <div id="inspect"></div>
47 <div id="other"></div> 47 <div id="other"></div>
48 48
49 </body> 49 </body>
50 </html> 50 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698