Regression(r188105): Seems to have caused crashes during PLT on some iPads
[WebKit-https.git] / LayoutTests / fast / css / disabled-author-styles.html
1 <html>
2 <head>
3     <script>
4         function loaded()
5         {
6             if (!window.testRunner) {
7                alert("This test must be run in the DumpRenderTree to work.");
8                return;
9             }
10             testRunner.waitUntilDone();
11             testRunner.setAuthorAndUserStylesEnabled(false);
12
13             // Check the matched rules after a timeout to give time for WebPreferences to update WebCore::Settings.
14             setTimeout(checkMatchedRules, 0);
15         }
16
17         function checkMatchedRules()
18         {
19             var matchedRules = getMatchedCSSRules(document.getElementById("test"), "");
20             if (matchedRules && matchedRules.length)
21                 alert(matchedRules.length + " rule(s) were returned from getMatchedCSSRules, expected zero.");
22
23             if (window.testRunner) {
24                 testRunner.notifyDone();
25             }
26         }
27     </script>
28     <style>
29         #test {
30             color: red;
31         }
32
33         #test2::before {
34             color: red;
35             content: "This pseudo-element text should not show up.";
36         }
37     </style>
38 </head>
39 <body onload="loaded();">
40     <div id="test">This text should be black, not red.</div>
41     <div id="test2"></div>
42 </body>
43 </html>