OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Media Queries Self-Contained Test Suite</title> | 4 <title>Media Queries Self-Contained Test Suite</title> |
5 <link rel="author" title="L. David Baron" href="http://dbaron.org/"> | 5 <link rel="author" title="L. David Baron" href="http://dbaron.org/"> |
6 <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"
> | 6 <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"
> |
7 <link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"> | 7 <link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"> |
8 <link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/"> | 8 <link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/"> |
9 <script type="text/javascript" src="../../../resources/testharness.js"></scrip
t> | 9 <script type="text/javascript" src="../../../resources/testharness.js"></scrip
t> |
10 <script type="text/javascript" src="../../../resources/testharnessreport.js"><
/script> | 10 <script type="text/javascript" src="../../../resources/testharnessreport.js"><
/script> |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 function run() { | 387 function run() { |
388 var subdoc = document.getElementById("subdoc").contentDocument; | 388 var subdoc = document.getElementById("subdoc").contentDocument; |
389 var subwin = document.getElementById("subdoc").contentWindow; | 389 var subwin = document.getElementById("subdoc").contentWindow; |
390 var style = subdoc.getElementById("style"); | 390 var style = subdoc.getElementById("style"); |
391 var iframe_style = document.getElementById("subdoc").style; | 391 var iframe_style = document.getElementById("subdoc").style; |
392 var body_cs = subdoc.defaultView.getComputedStyle(subdoc.body, ""); | 392 var body_cs = subdoc.defaultView.getComputedStyle(subdoc.body, ""); |
393 var testNum = 0; | 393 var testNum = 0; |
394 | 394 |
395 function query_applies(q) { | 395 function query_applies(q) { |
396 style.setAttribute("media", q); | 396 style.setAttribute("media", q); |
397 return body_cs.getPropertyValue("text-decoration") == "underline"; | 397 return body_cs.getPropertyValue("text-decoration") == "underline solid rgb
(0, 0, 0)"; |
398 } | 398 } |
399 | 399 |
400 function should_apply(q) { | 400 function should_apply(q) { |
401 test(function() { | 401 test(function() { |
402 assert_true(query_applies(q)); | 402 assert_true(query_applies(q)); |
403 }, "subtest_" + ++testNum, {assert: q + " should apply"}); | 403 }, "subtest_" + ++testNum, {assert: q + " should apply"}); |
404 } | 404 } |
405 | 405 |
406 function should_not_apply(q) { | 406 function should_not_apply(q) { |
407 test(function() { | 407 test(function() { |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 should_not_apply("(bogus)"); | 828 should_not_apply("(bogus)"); |
829 should_not_apply("not all and (bogus)") | 829 should_not_apply("not all and (bogus)") |
830 should_not_apply("only all and (bogus)") | 830 should_not_apply("only all and (bogus)") |
831 | 831 |
832 done(); | 832 done(); |
833 } | 833 } |
834 | 834 |
835 </script> | 835 </script> |
836 </body> | 836 </body> |
837 </html> | 837 </html> |
OLD | NEW |