blob: 9bda1e151a2076ed7cbf428343959632fb768449 [file] [log] [blame]
<html>
<head>
<title>CSS3 media query test: stylesheet media.mediaText = parsing, media descriptor fallback in document.StyleSheet.media.mediaText</title>
<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/">
<!-- the media property of stylesheet below will be manipulated, and the manipulation should fail. -->
<style type="text/css">
p#result { color: blue }
@media screen and resolution > 40dpi {
/* media query with syntax error should fail */
p#result { color: red }
}
</style>
<script>
function test() {
document.styleSheets[0].media.mediaText = "screen and resolution > 40dpi";
document.getElementById("result").innerHTML = "This text should neither be blue nor red.";
}
</script>
</head>
<body onload="test()">
<p id="result">Failure: test not run</p>
</body>
</html>