Bug 1498812 - Part 7: Generally enable Visual Viewport for Mochitests. r=botond
authorJan Henning <jh+bugzilla@buttercookie.de>
Fri, 11 Jan 2019 19:49:41 +0000
changeset 510654 c4fbfcb5239ba0b34d5845512cbb7f810fd64798
parent 510653 4eccacfc8801a8401d72458210dac451515b5bda
child 510655 2d9a52630c0414f20acc825f7e8dbc931965e908
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)
reviewersbotond
bugs1498812
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 1498812 - Part 7: Generally enable Visual Viewport for Mochitests. r=botond Easier than separately enabling it for each test in turn, and shouldn't have any bad side effects on tests that don't care about it, as this only exposes the new Window.visualViewport object, but doesn't change anything else. Differential Revision: https://phabricator.services.mozilla.com/D15688
gfx/layers/apz/test/mochitest/test_group_touchevents.html
gfx/layers/apz/test/mochitest/test_group_zoom.html
testing/profiles/unittest/user.js
--- a/gfx/layers/apz/test/mochitest/test_group_touchevents.html
+++ b/gfx/layers/apz/test/mochitest/test_group_touchevents.html
@@ -8,18 +8,17 @@
   <script type="application/javascript" src="apz_test_utils.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
 
 var basic_pan_prefs = getPrefs("TOUCH_EVENTS:PAN");
 
 var subtests = [
   // Simple tests to exercise basic panning behaviour
-  // The visual viewport isn't yet enabled by default and we want to test its events, too.
-  {"file": "helper_basic_pan.html", "prefs": basic_pan_prefs.concat([["dom.visualviewport.enabled", true]])},
+  {"file": "helper_basic_pan.html", "prefs": basic_pan_prefs},
   {"file": "helper_div_pan.html", "prefs": basic_pan_prefs},
   {"file": "helper_iframe_pan.html", "prefs": basic_pan_prefs},
 
   // Simple test to exercise touch-tapping behaviour
   {"file": "helper_tap.html"},
   // Tapping, but with a full-zoom applied
   {"file": "helper_tap_fullzoom.html"},
 
--- a/gfx/layers/apz/test/mochitest/test_group_zoom.html
+++ b/gfx/layers/apz/test/mochitest/test_group_zoom.html
@@ -34,18 +34,16 @@ var prefs = [
   ["dom.meta-viewport.enabled", true],
   // Pinch-zooming currently requires container scrolling (this requirement
   // will eventually be removed).
   ["layout.scroll.root-frame-containers", 1],
   // Retained displaylists don't work well with container scrolling, so
   // they too need to be disabled for now.
   ["layout.display-list.retain", false],
   ["layout.display-list.retain.chrome", false],
-  // The VisualViewport API currently isn't enabled by default.
-  ["dom.visualviewport.enabled", true],
 ];
 
 // Increase the tap timeouts so the double-tap is still detected in case of
 // random delays during testing.
 var doubletap_prefs = [
   ...prefs,
   ["ui.click_hold_context_menus.delay", 10000],
   ["apz.max_tap_time", 10000],
--- a/testing/profiles/unittest/user.js
+++ b/testing/profiles/unittest/user.js
@@ -114,16 +114,17 @@ user_pref("dom.push.connection.enabled",
 user_pref("dom.successive_dialog_time_limit", 0);
 // In the default configuration, we bypass XBL scopes (a security feature) for
 // domains whitelisted for remote XUL, so that intranet apps and such continue
 // to work without major rewrites. However, we also use the whitelist mechanism
 // to run our XBL tests in automation, in which case we really want to be testing
 // the configuration that we ship to users without special whitelisting. So we
 // use an additional pref here to allow automation to use the "normal" behavior.
 user_pref("dom.use_xbl_scopes_for_remote_xul", true);
+user_pref("dom.visualviewport.enabled", true); // on for testing
 user_pref("dom.w3c_touch_events.enabled", 1);
 user_pref("extensions.autoDisableScopes", 0);
 user_pref("extensions.blocklist.detailsURL", "http://{server}/extensions-dummy/blocklistDetailsURL");
 user_pref("extensions.blocklist.itemURL", "http://{server}/extensions-dummy/blocklistItemURL");
 user_pref("extensions.blocklist.url", "http://{server}/extensions-dummy/blocklistURL");
 // XPI extensions are required for test harnesses to load
 user_pref("extensions.defaultProviders.enabled", true);
 // Enable form autofill feature testing.