Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <style> | |
| 3 ::-webkit-scrollbar { | |
| 4 width: 0px; | |
| 5 height: 0px; | |
|
bokan
2016/06/16 07:22:43
Lets use normal scrollbars and give the iframe som
ymalik
2016/06/20 15:52:56
Done.
| |
| 6 } | |
| 7 body { | |
| 8 height: 2000px; | |
| 9 width: 2000px; | |
| 10 } | |
| 11 #frame { | |
| 12 height: 500px; | |
| 13 width: 200px; | |
| 14 } | |
| 15 </style> | |
| 16 <script src="../../../resources/testharness.js"></script> | |
| 17 <script src="../../../resources/testharnessreport.js"></script> | |
| 18 <script> | |
| 19 async_test(function(t) { | |
| 20 window.onload = t.step_func(function() { | |
| 21 internals.setPageScaleFactor(2); | |
| 22 | |
| 23 // verify visualViewport dimensions on containing iframe. | |
| 24 var frame = document.getElementById("frame"); | |
| 25 assert_equals(frame.contentWindow.visualViewport.clientWidth, 200); | |
| 26 assert_equals(frame.contentWindow.visualViewport.clientHeight, 500); | |
| 27 assert_equals(frame.contentWindow.visualViewport.scrollTop, 0); | |
| 28 assert_equals(frame.contentWindow.visualViewport.scrollLeft, 0); | |
| 29 assert_equals(frame.contentWindow.visualViewport.pageScale, 1); | |
| 30 | |
| 31 t.done(); | |
| 32 }); | |
| 33 }, 'Verify viewport dimensions for iframe.'); | |
| 34 </script> | |
| 35 <iframe id="frame" src="about:blank"></iframe> | |
| OLD | NEW |