| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <style> | 2 <style> |
| 3 body { | 3 body { |
| 4 height: 2000px; | 4 height: 2000px; |
| 5 width: 2000px; | 5 width: 2000px; |
| 6 } | 6 } |
| 7 #frame { | 7 #frame { |
| 8 height: 500px; | 8 height: 500px; |
| 9 width: 200px; | 9 width: 200px; |
| 10 } | 10 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 internals.setPageScaleFactor(2); | 24 internals.setPageScaleFactor(2); |
| 25 | 25 |
| 26 // The page scale on the root frame shouldn't affect the viewport/scale | 26 // The page scale on the root frame shouldn't affect the viewport/scale |
| 27 // values in the iframe. | 27 // values in the iframe. |
| 28 var frame = document.getElementById("frame"); | 28 var frame = document.getElementById("frame"); |
| 29 frame.contentWindow.scrollTo(10, 15); | 29 frame.contentWindow.scrollTo(10, 15); |
| 30 assert_equals(frameViewport().clientWidth, 200 - scrollbarWidth); | 30 assert_equals(frameViewport().clientWidth, 200 - scrollbarWidth); |
| 31 assert_equals(frameViewport().clientHeight, 500 - scrollbarHeight); | 31 assert_equals(frameViewport().clientHeight, 500 - scrollbarHeight); |
| 32 assert_equals(frameViewport().scrollLeft, 0); | 32 assert_equals(frameViewport().scrollLeft, 0); |
| 33 assert_equals(frameViewport().scrollTop, 0); | 33 assert_equals(frameViewport().scrollTop, 0); |
| 34 assert_equals(frameViewport().pageScale, 1); | 34 assert_equals(frameViewport().scale, 1); |
| 35 | 35 |
| 36 t.done(); | 36 t.done(); |
| 37 }); | 37 }); |
| 38 }, 'Verify viewport dimensions for iframe.'); | 38 }, 'Verify viewport dimensions for iframe.'); |
| 39 </script> | 39 </script> |
| 40 <iframe id="frame" srcdoc=" | 40 <iframe id="frame" srcdoc=" |
| 41 <style> | 41 <style> |
| 42 body { | 42 body { |
| 43 width: 2000px; | 43 width: 2000px; |
| 44 height: 2000px; | 44 height: 2000px; |
| 45 } | 45 } |
| 46 </style> | 46 </style> |
| 47 "></iframe> | 47 "></iframe> |
| OLD | NEW |