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

Side by Side Diff: LayoutTests/inspector/elements/styles/import-pseudoclass-crash.html

Issue 198053011: DevTools: [CSS] remove StyleId and RuleId types from protocol.json (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address @apavlov comments Created 6 years, 8 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 <link rel="stylesheet" href="resources/import-pseudoclass-crash.css"> 3 <link rel="stylesheet" href="resources/import-pseudoclass-crash.css">
4 <script src="../../../http/tests/inspector/inspector-test.js"></script> 4 <script src="../../../http/tests/inspector/inspector-test.js"></script>
5 <script src="../../../http/tests/inspector/elements-test.js"></script> 5 <script src="../../../http/tests/inspector/elements-test.js"></script>
6 <script> 6 <script>
7 7
8 function test() 8 function test()
9 { 9 {
10 WebInspector.inspectorView.showPanel("elements"); 10 WebInspector.inspectorView.showPanel("elements");
11 InspectorTest.nodeWithId("lastchild", nodeFound); 11 InspectorTest.nodeWithId("lastchild", nodeFound);
12 12
13 function nodeFound(node) 13 function nodeFound(node)
14 { 14 {
15 WebInspector.cssModel.getMatchedStylesAsync(node.id, true, false, matche dStylesCallback); 15 WebInspector.cssModel.getMatchedStylesAsync(node.id, true, false, matche dStylesCallback);
16 } 16 }
17 17
18 var styleSheetId; 18 var styleSheetId;
19 19
20 function matchedStylesCallback(styles) 20 function matchedStylesCallback(styles)
21 { 21 {
22 styleSheetId = styles.matchedCSSRules[1].id.styleSheetId; 22 styleSheetId = styles.matchedCSSRules[1].styleSheetId;
23 CSSAgent.setStyleSheetText(styleSheetId, 23 CSSAgent.setStyleSheetText(styleSheetId,
24 "@import url(\"import-pseudoclass-crash-empty.css\");\n\n:last-child { color: #000001; }\n", modifiedCallback); 24 "@import url(\"import-pseudoclass-crash-empty.css\");\n\n:last-child { color: #000001; }\n", modifiedCallback);
25 } 25 }
26 26
27 function modifiedCallback() 27 function modifiedCallback()
28 { 28 {
29 CSSAgent.setStyleSheetText(styleSheetId, "@import url(\"import-pseudocla ss-crash-empty.css\");\n\n:last-child { color: #002001; }\n", modifiedCallback2) ; 29 CSSAgent.setStyleSheetText(styleSheetId, "@import url(\"import-pseudocla ss-crash-empty.css\");\n\n:last-child { color: #002001; }\n", modifiedCallback2) ;
30 } 30 }
31 31
32 function modifiedCallback2() 32 function modifiedCallback2()
33 { 33 {
34 InspectorTest.completeTest(); 34 InspectorTest.completeTest();
35 } 35 }
36 } 36 }
37 37
38 </script> 38 </script>
39 </head> 39 </head>
40 40
41 <body onload="runTest()"> 41 <body onload="runTest()">
42 <p> 42 <p>
43 Tests that modifying stylesheet text with @import and :last-child selector does not crash (<a href="https://bugs.webkit.org/show_bug.cgi?id=95324">Bug 95324</a> ). 43 Tests that modifying stylesheet text with @import and :last-child selector does not crash (<a href="https://bugs.webkit.org/show_bug.cgi?id=95324">Bug 95324</a> ).
44 </p> 44 </p>
45 45
46 <div> 46 <div>
47 <p id="lastchild">:last-child</p> 47 <p id="lastchild">:last-child</p>
48 </div> 48 </div>
49 </body> 49 </body>
50 </html> 50 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698