Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/viewport/viewport-dimensions-iframe.html

Issue 2070563002: Seperate DOMVisualViewport from Blink's VisualViewport class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <style>
3 body {
4 height: 2000px;
5 width: 2000px;
6 }
7 #frame {
8 height: 500px;
9 width: 200px;
10 }
11 </style>
12 <script src="../../../resources/testharness.js"></script>
13 <script src="../../../resources/testharnessreport.js"></script>
14 <script>
15 var scrollbarWidth = 15;
16 var scrollbarHeight = 15;
17
18 function frameViewport() {
19 return frame.contentWindow.visualViewport;
20 }
21
22 async_test(function(t) {
23 window.onload = t.step_func(function() {
24 internals.setPageScaleFactor(2);
25
26 // verify visualViewport dimensions on containing iframe.
bokan 2016/06/22 18:29:08 Describe in the comment why the values are this wa
27 var frame = document.getElementById("frame");
28 frame.contentWindow.scrollTo(10, 15);
29 assert_equals(frameViewport().clientWidth, 200 - scrollbarWidth);
30 assert_equals(frameViewport().clientHeight, 500 - scrollbarHeight);
31 assert_equals(frameViewport().scrollLeft, 0);
32 assert_equals(frameViewport().scrollTop, 0);
33 assert_equals(frameViewport().pageScale, 1);
34
35 t.done();
36 });
37 }, 'Verify viewport dimensions for iframe.');
38 </script>
39 <iframe id="frame" srcdoc="
40 <style>
41 body {
42 width: 2000px;
43 height: 2000px;
44 }
45 </style>
46 "></iframe>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698