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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/styles-1/add-new-rule-inline-style-csp.html

Issue 1434613002: DevTools: kill WebInspector.StylesSectionModel class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 <meta http-equiv="Content-Security-Policy" content="style-src https://*:443 'uns afe-eval'"> 3 <meta http-equiv="Content-Security-Policy" content="style-src https://*:443 'uns afe-eval'">
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 var nodeId; 10 var nodeId;
(...skipping 10 matching lines...) Expand all
21 InspectorTest.nodeWithId("inspected", nodeCallback); 21 InspectorTest.nodeWithId("inspected", nodeCallback);
22 22
23 function nodeCallback(node) 23 function nodeCallback(node)
24 { 24 {
25 nodeId = node.id; 25 nodeId = node.id;
26 InspectorTest.addNewRule("#inspected", successCallback); 26 InspectorTest.addNewRule("#inspected", successCallback);
27 } 27 }
28 28
29 function successCallback(section) 29 function successCallback(section)
30 { 30 {
31 rule = section.styleRule.rule(); 31 rule = section._style.parentRule;
dgozman 2015/11/07 03:00:53 style()
lushnikov 2015/11/07 03:09:24 Done.
32 InspectorTest.addResult("=== Rule added ==="); 32 InspectorTest.addResult("=== Rule added ===");
33 InspectorTest.addResult(rule.selectorText() + " {" + rule.style. cssText + "}"); 33 InspectorTest.addResult(rule.selectorText() + " {" + rule.style. cssText + "}");
34 InspectorTest.addResult("Selectors matching the (#inspected) nod e: " + InspectorTest.matchingSelectors(rule)); 34 InspectorTest.addResult("Selectors matching the (#inspected) nod e: " + InspectorTest.matchingSelectors(rule));
35 next(); 35 next();
36 } 36 }
37 }, 37 },
38 38
39 function testAddProperty(next) 39 function testAddProperty(next)
40 { 40 {
41 rule.style.appendProperty("width", "100%", callback); 41 rule.style.appendProperty("width", "100%", callback);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 <body onload="runTest()"> 113 <body onload="runTest()">
114 <p> 114 <p>
115 Tests that adding a new rule does not crash the renderer and modifying an inline style does not report errors when forbidden by Content-Security-Policy. 115 Tests that adding a new rule does not crash the renderer and modifying an inline style does not report errors when forbidden by Content-Security-Policy.
116 </p> 116 </p>
117 117
118 <div id="inspected">Text</div> 118 <div id="inspected">Text</div>
119 119
120 </body> 120 </body>
121 </html> 121 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698