Bug 1517821 - Add a mochitest for bug 1513232. r=kats
authorBotond Ballo <botond@mozilla.com>
Fri, 04 Jan 2019 20:16:35 +0000
changeset 509685 022c976023ae3f7ac630af932d2dad1e16d03032
parent 509684 7627e62b38332c8f5ccdcff98000340a4ff20e4f
child 509686 f000153a1f7f599af8c805c5d447ef81fc5f14d3
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1517821, 1513232
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1517821 - Add a mochitest for bug 1513232. r=kats Differential Revision: https://phabricator.services.mozilla.com/D15741
dom/base/test/mochitest.ini
dom/base/test/test_meta_viewport_tiny_display_size.html
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -713,16 +713,17 @@ skip-if = !e10s # Track Bug 1281415
 [test_meta_viewport_maximum_scale_2.html]
 [test_meta_viewport_negative_width_and_negative_height.html]
 [test_meta_viewport_negative_width_and_no_height.html]
 [test_meta_viewport_negative_width_and_valid_height.html]
 [test_meta_viewport_valid_width_and_negative_height.html]
 [test_meta_viewport_valid_width_and_no_height.html]
 [test_meta_viewport_no_width_and_negative_height.html]
 [test_meta_viewport_no_width_and_valid_height.html]
+[test_meta_viewport_tiny_display_size.html]
 [test_mozbrowser_apis_blocked.html]
 [test_mozMatchesSelector.html]
 [test_mutationobserver_anonymous.html]
 [test_mutationobservers.html]
 [test_named_frames.html]
 [test_navigator_hardwareConcurrency.html]
 [test_navigator_language.html]
 [test_navigatorPrefOverride.html]
new file mode 100644
--- /dev/null
+++ b/dom/base/test/test_meta_viewport_tiny_display_size.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+  <meta charset="utf-8">
+  <title>meta viewport test</title>
+  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="application/javascript" src="/tests/SimpleTest/AddTask.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+  <meta name="viewport" content="width=device-width">
+  <script src="viewport_helpers.js"></script>
+</head>
+<body>
+  <p>width=device-width</p>
+  <script type="application/javascript">
+    "use strict";
+
+    add_task(async function test1() {
+      await SpecialPowers.pushPrefEnv(scaleRatio(1.0));
+
+      // Check that the minimum viewport dimension of (200,40) are not enforced 
+      // in cases where the display size itself has a smaller dimension. 
+      let info = getViewportInfo(192, 32);
+      is(info.defaultZoom, 1,    "initial zoom is 100%");
+      is(info.width,       192,  "width is the same as the displayWidth");
+      is(info.height,      32,   "height is the same as the displayHeight");
+    });
+  </script>
+</body>
+</html>