summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/cssom/cssimportrule-media.html
blob: 72733f014923173823c464475609054bde2e3ef9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html>
  <head>
    <title>CSSOM - CSSImportRule - Media</title>
    <link rel="author" title="Glenn Adams" href="mailto:glenn@skynav.com"/>
    <link rel="help" href="http://www.w3.org/TR/cssom/#the-cssimportrule-interface"/>
    <meta name="flags" content="dom"/>
    <script src="../resources/testharness.js"></script>
    <script src="../resources/testharnessreport.js"></script>
    <style id="sheet1">
      @import "resources/import.css";
    </style>
    <style id="sheet2">
      @import "resources/import.css" all;
    </style>
    <style id="sheet3">
      @import "resources/import.css" not tv;
    </style>
    <style id="sheet4">
      @import "resources/import.css" screen, tv;
    </style>
  </head>
  <body>
    <div id="log"></div>
    <div id="box"></div>
    <script>

      var doc = window.document;

      var sheet1 = doc.styleSheets[0];

      test(function(){

        assert_equals(sheet1.cssRules[0].cssText, '@import url(\"resources/import.css\");');

      }, 'doc.styleSheets[0].cssRules[0].cssText == \'@import url(\"resources/import.css\");\'');

      var sheet2 = doc.styleSheets[1];

      test(function(){

        assert_equals(sheet2.cssRules[0].cssText, '@import url(\"resources/import.css\") all;');

      }, 'doc.styleSheets[1].cssRules[0].cssText == \'@import url(\"resources/import.css\") all;\'');

      var sheet3 = doc.styleSheets[2];

      test(function(){

        assert_equals(sheet3.cssRules[0].cssText, '@import url(\"resources/import.css\") not tv;');

      }, 'doc.styleSheets[2].cssRules[0].cssText == \'@import url(\"resources/import.css\") not tv;\'');

      var sheet4 = doc.styleSheets[3];

      test(function(){

        assert_equals(sheet4.cssRules[0].cssText, '@import url(\"resources/import.css\") screen, tv;');

      }, 'doc.styleSheets[3].cssRules[0].cssText == \'@import url(\"resources/import.css\") screen, tv;\'');

    </script>
  </body>
</html>