4 <title>CSSOM - CSSImportRule - Media
</title>
5 <link rel=
"author" title=
"Glenn Adams" href=
"mailto:glenn@skynav.com"/>
6 <link rel=
"help" href=
"http://www.w3.org/TR/cssom/#the-cssimportrule-interface"/>
7 <meta name=
"flags" content=
"dom"/>
8 <script src=
"../resources/testharness.js"></script>
9 <script src=
"../resources/testharnessreport.js"></script>
11 @import
"resources/import.css";
14 @import
"resources/import.css" all;
17 @import
"resources/import.css" not tv;
20 @import
"resources/import.css" screen, tv;
28 var doc
= window
.document
;
30 var sheet1
= doc
.styleSheets
[0];
34 assert_equals(sheet1
.cssRules
[0].cssText
, '@import url(\"resources/import.css\");');
36 }, 'doc.styleSheets[0].cssRules[0].cssText == \'@import url(\"resources/import.css\");\'');
38 var sheet2
= doc
.styleSheets
[1];
42 assert_equals(sheet2
.cssRules
[0].cssText
, '@import url(\"resources/import.css\") all;');
44 }, 'doc.styleSheets[1].cssRules[0].cssText == \'@import url(\"resources/import.css\") all;\'');
46 var sheet3
= doc
.styleSheets
[2];
50 assert_equals(sheet3
.cssRules
[0].cssText
, '@import url(\"resources/import.css\") not tv;');
52 }, 'doc.styleSheets[2].cssRules[0].cssText == \'@import url(\"resources/import.css\") not tv;\'');
54 var sheet4
= doc
.styleSheets
[3];
58 assert_equals(sheet4
.cssRules
[0].cssText
, '@import url(\"resources/import.css\") screen, tv;');
60 }, 'doc.styleSheets[3].cssRules[0].cssText == \'@import url(\"resources/import.css\") screen, tv;\'');