Index: LayoutTests/css3/device-adapt/viewport-min-width-extend-to-zoom.html |
diff --git a/LayoutTests/css3/device-adapt/viewport-min-width-extend-to-zoom.html b/LayoutTests/css3/device-adapt/viewport-min-width-extend-to-zoom.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e65a352070a4303876b45b2fb26fd94d64bcecb0 |
--- /dev/null |
+++ b/LayoutTests/css3/device-adapt/viewport-min-width-extend-to-zoom.html |
@@ -0,0 +1,43 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+ <title>Viewport 'min-width' 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 { width: -internal-extend-to-zoom 200px; zoom: 1.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) { |
+ actualWidth = parseFloat(match[1]); |
+ } |
+ |
+ test(function(){ |
+ assert_equals(actualWidth, 320); |
+ }, "Check viewport width."); |
+ </script> |
+</body> |
+</html> |