| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Media Queries - viewport units support</title> | 4 <title>This tests validate that the viewport units work in media queries.</tit
le> |
| 5 <script src="../../resources/testharness.js"></script> | 5 <script src="../../resources/testharness.js"></script> |
| 6 <script src="../../resources/testharnessreport.js"></script> | 6 <script src="../../resources/testharnessreport.js"></script> |
| 7 <script> | 7 <script> |
| 8 test(function(){ | 8 test(function(){ |
| 9 assert_true(matchMedia('(max-width: 100vw)').matches); | 9 assert_true(matchMedia('(max-width: 100vw)').matches); |
| 10 }, "vw unit sanity check"); | 10 }, "vw unit sanity check"); |
| 11 test(function(){ | 11 test(function(){ |
| 12 assert_true(matchMedia('(max-height: 100vh)').matches); | 12 assert_true(matchMedia('(max-height: 100vh)').matches); |
| 13 }, "vh unit sanity check"); | 13 }, "vh unit sanity check"); |
| 14 test(function(){ | 14 test(function(){ |
| 15 assert_true(matchMedia('(max-width: 100vmax)').matches); | 15 assert_true(matchMedia('(max-width: 100vmax)').matches); |
| 16 }, "vmax unit sanity check"); | 16 }, "vmax unit sanity check"); |
| 17 test(function(){ | 17 test(function(){ |
| 18 assert_true(matchMedia('(max-height: 100vmin)').matches); | 18 assert_true(matchMedia('(max-height: 100vmin)').matches); |
| 19 }, "vmin unit sanity check"); | 19 }, "vmin unit sanity check"); |
| 20 </script> | 20 </script> |
| 21 </head> | 21 </head> |
| 22 <body> | |
| 23 <h1>Description</h1> | |
| 24 <p>This tests validates that the viewport units work in media queries.</p> | |
| 25 </body> | |
| 26 </html> | 22 </html> |
| OLD | NEW |