4 <title>Media Query List syntax
</title>
5 <link rel=
"author" title=
"Rune Lillesveen" href=
"mailto:rune@opera.com">
6 <link rel=
"help" href=
"http://www.w3.org/TR/css3-mediaqueries/#syntax">
7 <script type=
"text/javascript" src=
"../../resources/testharness.js"></script>
8 <script type=
"text/javascript" src=
"../../resources/testharnessreport.js"></script>
9 <style id=
"sheet">/**/
</style>
13 [ "@media all, not,{}", "all, not all, not all" , "Media query error #1" ],
14 [ "@media screen, all and f() {}", "screen, not all", "Media query error #2" ],
15 [ "@media not and (color), #screen, screen {}", "not all, not all, screen", "Media query error #3" ],
16 [ "@media all; @media tv {}", "tv", "Media query error #4" ],
17 [ "@media ({ block, }), tv {}", "not all, tv", "Media query error #5" ],
18 [ "@media screen and(color), tv {}", "not all, tv", "Media query error #6" ],
19 [ "@media all and (color) and (f() {}), tv {}", "not all, tv", "Media query error #7" ],
20 [ "@media tv, all or (nothing) {}", "tv, not all", "Media query error #8" ],
21 [ "@media tv, all and (color) tv {}", "tv, not all", "Media query error #9" ]
23 var cdataNode
= document
.getElementById("sheet").firstChild
;
24 for (var i
=0; i
< tests
.length
; i
++) {
25 cdataNode
.data
= tests
[i
][0];
26 if (document
.styleSheets
[0].cssRules
.length
> 0 &&
27 document
.styleSheets
[0].cssRules
[0].type
== 4) {
28 result
= document
.styleSheets
[0].cssRules
[0].media
.mediaText
;
31 result
= "MEDIA RULE DROPPED!";
34 assert_equals(result
, tests
[i
][1]);