OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <script src="../js/resources/js-test-pre.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 | 5 |
6 <div id="detector"></div> | 6 <div id="detector"></div> |
7 | 7 |
8 <style> | 8 <style> |
9 #detector { width: 100px; } | 9 #detector { width: 100px; } |
10 @media (-webkit-min-device-pixel-ratio: 1) { #detector { width: 10px; } } | 10 @media (-webkit-min-device-pixel-ratio: 1) { #detector { width: 10px; } } |
11 @media print and (-webkit-min-device-pixel-ratio: 3) { #detector { width: 30
px; } } | 11 @media print and (-webkit-min-device-pixel-ratio: 3) { #detector { width: 30
px; } } |
12 </style> | 12 </style> |
13 | 13 |
14 <script> | 14 <script> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 shouldBe("resolutionFromStyle()", "3"); | 48 shouldBe("resolutionFromStyle()", "3"); |
49 | 49 |
50 // As well as those matching 'all'. | 50 // As well as those matching 'all'. |
51 appendMediaRule("@media (-webkit-min-device-pixel-ratio: 3.125) { #detec
tor { width: 31px; } }"); | 51 appendMediaRule("@media (-webkit-min-device-pixel-ratio: 3.125) { #detec
tor { width: 31px; } }"); |
52 shouldBe("resolutionFromStyle()", "3.125"); | 52 shouldBe("resolutionFromStyle()", "3.125"); |
53 } | 53 } |
54 </script> | 54 </script> |
55 | 55 |
56 </body> | 56 </body> |
57 </html> | 57 </html> |
OLD | NEW |