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

Side by Side Diff: LayoutTests/userscripts/user-stylesheet-invalidate.html

Issue 11412176: Merge 135082 - REGRESSION(r129644): User StyleSheet not applying (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years 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 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <html>
3 <head> 3 <head>
4 <style> 4 <style>
5 * { color: red; } 5 * { color: red; }
6 </style> 6 </style>
7 <script> 7 <script>
8 if (window.testRunner) { 8 if (window.testRunner) {
9 testRunner.dumpAsText(); 9 testRunner.dumpAsText();
10 testRunner.addUserStyleSheet("div { width:0; }", true); 10 testRunner.addUserStyleSheet("div { width:0; }", true);
11 } 11 }
12 </script> 12 </script>
13 </head> 13 </head>
14 <body> 14 <body>
15 This test requires layout test runner. 15 This test requires layout test runner.
16 <div id="target">FAIL</div> 16 <div id="target">FAIL</div>
17 <script> 17 <script>
18 var style = document.createElement("style"); 18 var style = document.createElement("style");
19 style.innerText = "* { color: blue; }"; 19 style.innerText = "* { color: blue; }";
20 document.head.insertBefore(style, document.getElementsByTagName("style")[0]); 20 document.head.insertBefore(style, document.getElementsByTagName("style")[0]);
21 if (document.getElementById('target').offsetWidth == 0) 21 if (document.getElementById('target').offsetWidth == 0)
22 document.getElementById('target').innerHTML = 'PASS'; 22 document.getElementById('target').innerHTML = 'PASS';
23 </script> 23 </script>
24 </body> 24 </body>
25 </html> 25 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698