Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>@viewport user agent stylesheet</title> | 4 <title>@viewport user agent stylesheet</title> |
| 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 if (window.testRunner) { | 8 if (window.testRunner) { |
| 9 // FIXME: Emulate the android viewport UA stylesheet. We should test this | |
| 10 // based on the platform we're building for | |
| 11 testRunner.injectStyleSheet("@viewport {min-width: 980px}", true); | |
| 12 internals.settings.setViewportEnabled(true); | 9 internals.settings.setViewportEnabled(true); |
| 10 internals.settings.setUseMobileViewportStyle(true); | |
|
dcheng
2015/04/02 04:41:18
Depending on how trybot runs go, I may make this t
| |
| 13 } | 11 } |
| 14 </script> | 12 </script> |
| 15 <style> | 13 <style> |
| 16 html, body { width: 100%; height: 100%; margin: 0 } | 14 html, body { width: 100%; height: 100%; margin: 0 } |
| 17 </style> | 15 </style> |
| 18 </head> | 16 </head> |
| 19 <body style="overflow: hidden;"> | 17 <body style="overflow: hidden;"> |
| 20 <div id="log"></div> | 18 <div id="log"></div> |
| 21 <script> | 19 <script> |
| 22 test(function(){ | 20 test(function(){ |
| 23 assert_equals(document.body.offsetWidth, 980); | 21 assert_equals(document.body.offsetWidth, 980); |
| 24 }, "Check that we get a viewport width of 980px from the user agent styl esheet."); | 22 }, "Check that we get a viewport width of 980px from the user agent styl esheet."); |
| 25 </script> | 23 </script> |
| 26 </body> | 24 </body> |
| 27 </html> | 25 </html> |
| OLD | NEW |