Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / media / mq-resolution-dpi-dpcm-warning.html
blob3ed6ce1a4d2e89f5b594fa3170782886aaff652a
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <style type="text/css">
5 /* Verify that warning is added to console when stylesheet is parsed */
6 @media screen and (min-resolution: 96dpi) { }
7 @media all and (min-resolution: 160dpcm) { }
8 @media (resolution: 96dpi) { }
9 </style>
10 <style type="text/css" id="styleElement" media="all and (color)">
11 </style>
12 </head>
13 <body>
14 <p>Test verifies that warning is added to console when dpi or dpcm CSS values are used for resolution media feature</p>
16 <script type="text/javascript">
17 if (window.testRunner)
18 testRunner.dumpAsText();
20 var styleElement = document.getElementById("styleElement");
21 // Verify that warning is added to console when HTMLStyleElement is updated.
22 styleElement.setAttribute("media", "(min-resolution: 2dpi)");
23 styleElement.setAttribute("media", "(min-resolution: 2dpcm)");
24 styleElement.setAttribute("media", "screen and (min-resolution: 5dpi)");
25 styleElement.setAttribute("media", "screen and (min-resolution: 5dpcm)");
26 styleElement.setAttribute("media", "all and (min-resolution: 10dpi)");
27 styleElement.setAttribute("media", "all and (min-resolution: 10dpcm)");
29 // Verify that warning is added to console when media listeners interface is used.
30 window.matchMedia("screen and (max-resolution: 300dpi)");
31 window.matchMedia("screen and (max-resolution: 300dpcm)");
32 window.matchMedia("(resolution: 96dpi)");
33 window.matchMedia("(resolution: 96dpcm)");
34 window.matchMedia("all and (resolution: 96dpi)");
35 window.matchMedia("all and (resolution: 96dpcm)");
36 </script>
37 </body>
38 </html>