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

Unified Diff: LayoutTests/fast/media/mq-js-media-except-03.html

Issue 16325005: Remove the Media Query "forward compatibly syntax" support in alignment with HTML5 spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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-except-03.html
diff --git a/LayoutTests/fast/media/mq-js-media-except-03.html b/LayoutTests/fast/media/mq-js-media-except-03.html
index 07bc419bfbce4d6a6e0427a143f63aa7a9542762..c32e9558b2c9965e9027ce006046172e4715e26b 100644
--- a/LayoutTests/fast/media/mq-js-media-except-03.html
+++ b/LayoutTests/fast/media/mq-js-media-except-03.html
@@ -1,34 +1,36 @@
<html>
<head>
<title>CSS3 media query test: @media css rule media.mediaText property parsing, media query syntax error should be handled correctly (,,,,).</title>
-<link rel="help" href="http://www.w3.org/TR/CSS21/media.html" />
-<link rel="help" href="http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule" />
-<!-- this test shows slight disconnect between css media queries and html4 media descriptors -->
+<link rel="help" href="http://www.w3.org/TR/CSS21/media.html">
+<link rel="help" href="http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule">
+
+<!-- this test shows there there is no disconnect between CSS media queries and HTML5 media descriptors -->
<style type="text/css">
-p#result {color: green}
+
+p#result { color: red }
@media braille {
-/* query will be modified from javascript */
-/* the manipulation contains syntax error, and should fail */
-p#result {color: red}
-}
+ /* query will be modified from javascript */
+ /* the manipulation contains syntax error, and should fail */
+ p#result { color: red }
}
+
</style>
-<script language="javascript">
+<script>
function test() {
try {
- // this shouldn't throw
+ // This shouldn't throw.
document.styleSheets[0].media.mediaText = ",,,,";
- document.getElementById("result").innerHTML = "Success. This text should be green.";
+ document.getElementById("result").innerHTML = "Success. This text should not be red.";
} catch (e) {
document.getElementById("result").innerHTML = "Failure. ,,,, should be valid media descriptor.";
document.getElementById("details").innerHTML = "Caught exception: " + e;
return;
}
try {
- // this shouldn't throw
+ // This shouldn't throw.
document.styleSheets[0].cssRules[1].media.mediaText = ",,,,";
- document.getElementById("result").innerHTML = "Success. This text should be green.";
+ document.getElementById("result").innerHTML = "Success. This text should not be red.";
} catch (e) {
document.getElementById("result").innerHTML = "Failure. Exception thrown.";
document.getElementById("details").innerHTML = "Caught exception: " + e;
« no previous file with comments | « LayoutTests/fast/media/mq-invalid-syntax-05-expected.html ('k') | LayoutTests/fast/media/mq-js-media-except-03-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698