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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/dom/viewport/viewport-dimensions-iframe.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/viewport/viewport-dimensions-iframe.html b/third_party/WebKit/LayoutTests/fast/dom/viewport/viewport-dimensions-iframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..8d37597a49713bb6ec7f73f877040f950d5d6e1c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/viewport/viewport-dimensions-iframe.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<style>
+ ::-webkit-scrollbar {
+ width: 0px;
+ 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.
+ }
+ body {
+ height: 2000px;
+ width: 2000px;
+ }
+ #frame {
+ height: 500px;
+ width: 200px;
+ }
+</style>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script>
+ async_test(function(t) {
+ window.onload = t.step_func(function() {
+ internals.setPageScaleFactor(2);
+
+ // verify visualViewport dimensions on containing iframe.
+ var frame = document.getElementById("frame");
+ assert_equals(frame.contentWindow.visualViewport.clientWidth, 200);
+ assert_equals(frame.contentWindow.visualViewport.clientHeight, 500);
+ assert_equals(frame.contentWindow.visualViewport.scrollTop, 0);
+ assert_equals(frame.contentWindow.visualViewport.scrollLeft, 0);
+ assert_equals(frame.contentWindow.visualViewport.pageScale, 1);
+
+ t.done();
+ });
+ }, 'Verify viewport dimensions for iframe.');
+</script>
+<iframe id="frame" src="about:blank"></iframe>

Powered by Google App Engine
This is Rietveld 408576698