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

Unified Diff: LayoutTests/css3/device-adapt/viewport-height-extend-to-zoom.html

Issue 19632002: Support 'extend-to-zoom' viewport descriptor value (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed isExtendToZoom() Created 7 years, 5 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
« no previous file with comments | « no previous file | LayoutTests/css3/device-adapt/viewport-height-extend-to-zoom-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/css3/device-adapt/viewport-height-extend-to-zoom.html
diff --git a/LayoutTests/css3/device-adapt/viewport-height-extend-to-zoom.html b/LayoutTests/css3/device-adapt/viewport-height-extend-to-zoom.html
new file mode 100644
index 0000000000000000000000000000000000000000..617e9d89cb0e07dfa2e563953734619a066095f7
--- /dev/null
+++ b/LayoutTests/css3/device-adapt/viewport-height-extend-to-zoom.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Viewport 'height' descriptor has 'extend-to-zoom' value</title>
+ <script src="../../resources/testharness.js"></script>
+ <script src="../../resources/testharnessreport.js"></script>
+ <style>
+ html, body { width: 100%; height: 100%; margin: 0 }
+ @viewport { height: -internal-extend-to-zoom; zoom: 2.0; }
+ </style>
+ <script>
+ test(function(){
+ assert_own_property(window, "testRunner");
+ }, "Check that window.testRunner is present. Required to add a user stylesheet.");
+
+ if (window.testRunner) {
+ testRunner.addUserStyleSheet("@viewport { width: -internal-extend-to-zoom 980px; min-zoom: 0.25; max-zoom: 5; height: auto ; zoom: auto; user-zoom: zoom; orientation: auto }", true);
+ }
+ </script>
+</head>
+<body>
+ <div id="log"></div>
+ <script>
+ test(function(){
+ assert_own_property(window, "internals");
+ }, "Check that window.internals is present. Required to call configurationForViewport.");
+
+ var actualWidth;
+ var actualHeight;
+
+ var vpString = internals.configurationForViewport(document, 1, 320, 480, 320, 352);
+ var match = /viewport size (.+)x(.+) scale (.+ )/.exec(vpString);
+
+ if (match) {
+ actualHeight = parseFloat(match[2]);
+ }
+
+ test(function(){
+ assert_equals(actualHeight, 176);
+ }, "Check viewport height.");
+ </script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/css3/device-adapt/viewport-height-extend-to-zoom-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698