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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/window-inner-size-scaling.html

Issue 1712743002: Revert "Make window.scroll properties relative to the layout viewport by default." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix failing test Created 4 years, 10 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/window-inner-size-scaling.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/window-inner-size-scaling.html b/third_party/WebKit/LayoutTests/fast/dom/window-inner-size-scaling.html
new file mode 100644
index 0000000000000000000000000000000000000000..a0168572c0b05f38503d7f9974632cd13b989b9c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/window-inner-size-scaling.html
@@ -0,0 +1,16 @@
+<html>
+ <script src="../../resources/js-test.js"></script>
+ <script>
+ description("This test ensures window.innerWidth/innerHeight return the size of the visual viewport in CSS pixels.");
+
+ var originalWidth = window.innerWidth;
+ var originalHeight = window.innerHeight;
+ var scale = 2;
+
+ if (window.internals)
+ window.internals.setPageScaleFactor(scale);
+
+ shouldBe("window.innerWidth", "Math.floor(originalWidth / scale)");
+ shouldBe("window.innerHeight", "Math.floor(originalHeight / scale)");
+ </script>
+</html>

Powered by Google App Engine
This is Rietveld 408576698