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

Unified Diff: LayoutTests/fast/media/mq-js-media-forward-syntax.html

Issue 14065029: Improved parse error handling for CSSMQ. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 months 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/media/mq-js-media-forward-syntax.html
diff --git a/LayoutTests/fast/media/mq-js-media-forward-syntax.html b/LayoutTests/fast/media/mq-js-media-forward-syntax.html
index 5e74cdb9f8eb6840200573c0e02a26e3c9502171..5f30daf01315655465db02bbc3c830c2cc9058cc 100644
--- a/LayoutTests/fast/media/mq-js-media-forward-syntax.html
+++ b/LayoutTests/fast/media/mq-js-media-forward-syntax.html
@@ -1,31 +1,22 @@
<html>
<head>
-<title>CSS3 media query test: stylesheet media.mediaText = parsing, media descriptor fallback in document.StyleSheet.media.mediaText</title>
+<title>CSS3 media query test: stylesheet media.mediaText = parsing, media descriptors not accepted</title>
<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/" />
<!-- the media property of stylesheet below will be manipulated, and
- manipulation should respect html media descriptor forward-compatible syntax.
- This means the manipulation should succeed. -->
+ manipulation should respect media queries error handling.
+ This means the manipulation should succeed and set media to 'not all'. -->
<style type="text/css">
-
-p#result { color: green;}
-
-@media screen and resolution > 40dpi {
-/* media query with syntax error should fail */
-/* corresponding DOM manipulation to the mediaText of the stylesheet will succeed */
p#result { color: red;}
-
-}
</style>
<script language="javascript">
function test() {
- // this should not throw, because StyleSheet should respect Media Description forward-compatible syntax
+ // Setting mediaText should not throw according to the CSSOM spec and yield
+ // 'not all' according to the Media Queries spec.
document.styleSheets[0].media.mediaText = "screen and resolution > 40dpi";
- document.getElementById("result").innerHTML = "This text should be green.";
+ document.getElementById("result").innerHTML = "This text should not be red.";
}
</script>
-
-
</head>
<body onload="test()">
<p id="result">Failure: test not run</p>

Powered by Google App Engine
This is Rietveld 408576698