| if (!window.layoutTestController) { |
| alert("This test must be run in the DumpRenderTree to work."); |
| layoutTestController.waitUntilDone(); |
| layoutTestController.setAuthorAndUserStylesEnabled(false); |
| // Check the matched rules after a timeout to give time for WebPreferences to update WebCore::Settings. |
| setTimeout(checkMatchedRules, 0); |
| function checkMatchedRules() |
| var matchedRules = getMatchedCSSRules(document.getElementById("test"), ""); |
| if (matchedRules && matchedRules.length) |
| alert(matchedRules.length + " rule(s) were returned from getMatchedCSSRules, expected zero."); |
| if (window.layoutTestController) { |
| layoutTestController.notifyDone(); |
| content: "This pseudo-element text should not show up."; |
| <body onload="loaded();"> |
| <div id="test">This text should be black, not red.</div> |