OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <style> | 3 <style> |
4 @media all and(min-width: 2px) { #styled { color: green; } } | 4 #styled { color: green } |
| 5 @media all and(min-width: 2px) { #styled { color: red; } } |
5 @media all and(max-width: 1px) { #styled { color: red; } } | 6 @media all and(max-width: 1px) { #styled { color: red; } } |
6 </style> | 7 </style> |
7 <script> | 8 <script> |
8 function runTest() { | 9 function runTest() { |
9 if (window.testRunner) | 10 if (window.testRunner) |
10 testRunner.dumpAsText(); | 11 testRunner.dumpAsText(); |
11 | 12 |
12 var element = document.getElementById('styled'); | 13 var element = document.getElementById('styled'); |
13 var computedColor = window.getComputedStyle(element).color; | 14 var computedColor = window.getComputedStyle(element).color; |
14 if (computedColor === "rgb(0, 128, 0)") | 15 if (computedColor === "rgb(0, 128, 0)") |
15 document.getElementById("result").textContent = "SUCCESS"; | 16 document.getElementById("result").textContent = "SUCCESS"; |
16 else | 17 else |
17 document.getElementById("result").textContent = "FAILURE: "
+ computedColor; | 18 document.getElementById("result").textContent = "FAILURE: "
+ computedColor; |
18 } | 19 } |
19 </script> | 20 </script> |
20 </head> | 21 </head> |
21 <body onload="runTest();"> | 22 <body onload="runTest();"> |
22 <div id="styled">This should be green</div> | 23 <div id="styled">This should be green</div> |
23 <div id="result">FAILURE</div> | 24 <div id="result">FAILURE</div> |
24 </body> | 25 </body> |
25 </html> | 26 </html> |
OLD | NEW |