Index: LayoutTests/fast/media/media-query-list-syntax.html |
diff --git a/LayoutTests/fast/media/media-query-list-syntax.html b/LayoutTests/fast/media/media-query-list-syntax.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d13faa71c4888d9369a069e815435e99eef299d3 |
--- /dev/null |
+++ b/LayoutTests/fast/media/media-query-list-syntax.html |
@@ -0,0 +1,40 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+ <title>Media Query List syntax</title> |
+ <link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com"> |
+ <link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#syntax"> |
+ <script type="text/javascript" src="../../resources/testharness.js"></script> |
+ <script type="text/javascript" src="../../resources/testharnessreport.js"></script> |
+ <style id="sheet">/**/</style> |
+ <script> |
+ |
+ var tests = [ |
+ [ "@media all, not,{}", "all, not all, not all" , "Media query error #1" ], |
+ [ "@media screen, all and f() {}", "screen, not all", "Media query error #2" ], |
+ [ "@media not and (color), #screen, screen {}", "not all, not all, screen", "Media query error #3" ], |
+ [ "@media all; @media tv {}", "tv", "Media query error #4" ], |
+ [ "@media ({ block, }), tv {}", "not all, tv", "Media query error #5" ], |
+ [ "@media screen and(color), tv {}", "screen and (color), tv", "Media query error #6" ], |
+ [ "@media all and (color) and (f() {}), tv {}", "not all, tv", "Media query error #7" ] |
+ ]; |
+ var cdataNode = document.getElementById("sheet").firstChild; |
+ for (var i=0; i < tests.length; i++) { |
+ cdataNode.data = tests[i][0]; |
+ if (document.styleSheets[0].cssRules.length > 0 && |
+ document.styleSheets[0].cssRules[0].type == 4) { |
+ result = document.styleSheets[0].cssRules[0].media.mediaText; |
+ } |
+ else { |
+ result = "MEDIA RULE DROPPED!"; |
+ } |
+ test(function() { |
+ assert_equals(result, tests[i][1]); |
+ }, tests[i][2]); |
+ } |
+ </script> |
+</head> |
+<body> |
+ <div id="log"></div> |
+</body> |
+</html> |