Bug 986807 patch 2 - Sync APZC/viewport prefs from bug 975931 from desktop reftest code to Android/B2G reftest code. r=roc
authorL. David Baron <dbaron@dbaron.org>
Sun, 23 Mar 2014 18:44:50 -0700
changeset 174989 6930ffbc0f1d6dbe504e74405015d22896e77ccc
parent 174988 0ce172037ced6f5dbad14eaf8df22b89547432a5
child 174990 1e64154383d4af2ea9939bcdfc796a485d3cd7dc
push id41401
push userdbaron@mozilla.com
push dateMon, 24 Mar 2014 01:45:28 +0000
treeherdermozilla-inbound@6930ffbc0f1d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs986807, 975931
milestone31.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 986807 patch 2 - Sync APZC/viewport prefs from bug 975931 from desktop reftest code to Android/B2G reftest code. r=roc
layout/tools/reftest/b2g_start_script.js
layout/tools/reftest/bootstrap.js
--- a/layout/tools/reftest/b2g_start_script.js
+++ b/layout/tools/reftest/b2g_start_script.js
@@ -33,16 +33,23 @@ function setDefaultPrefs() {
     branch.setIntPref("urlclassifier.updateinterval", 172800);
     // Disable high-quality downscaling, since it makes reftests more difficult.
     branch.setBoolPref("image.high_quality_downscaling.enabled", false);
     // Checking whether two files are the same is slow on Windows.
     // Setting this pref makes tests run much faster there.
     branch.setBoolPref("security.fileuri.strict_origin_policy", false);
     // Disable the thumbnailing service
     branch.setBoolPref("browser.pagethumbnails.capturing_disabled", true);
+    // Enable APZC so we can test it
+    branch.setBoolPref("layers.async-pan-zoom.enabled", true);
+    // Since our tests are 800px wide, set the assume-designed-for width of all
+    // pages to be 800px (instead of the default of 980px). This ensures that
+    // in our 800px window we don't zoom out by default to try to fit the
+    // assumed 980px content.
+    branch.setIntPref("browser.viewport.desktopWidth", 800);
     // Disable the fade out (over time) of overlay scrollbars, since we
     // can't guarantee taking both reftest snapshots at the same point
     // during the fade.
     branch.setBoolPref("layout.testing.overlay-scrollbars.always-visible", true);
 }
 
 function setPermissions() {
   if (__marionetteParams.length < 2) {
--- a/layout/tools/reftest/bootstrap.js
+++ b/layout/tools/reftest/bootstrap.js
@@ -38,16 +38,23 @@ function setDefaultPrefs() {
     branch.setIntPref("urlclassifier.updateinterval", 172800);
     // Disable high-quality downscaling, since it makes reftests more difficult.
     branch.setBoolPref("image.high_quality_downscaling.enabled", false);
     // Checking whether two files are the same is slow on Windows.
     // Setting this pref makes tests run much faster there.
     branch.setBoolPref("security.fileuri.strict_origin_policy", false);
     // Disable the thumbnailing service
     branch.setBoolPref("browser.pagethumbnails.capturing_disabled", true);
+    // Enable APZC so we can test it
+    branch.setBoolPref("layers.async-pan-zoom.enabled", true);
+    // Since our tests are 800px wide, set the assume-designed-for width of all
+    // pages to be 800px (instead of the default of 980px). This ensures that
+    // in our 800px window we don't zoom out by default to try to fit the
+    // assumed 980px content.
+    branch.setIntPref("browser.viewport.desktopWidth", 800);
     // Disable the fade out (over time) of overlay scrollbars, since we
     // can't guarantee taking both reftest snapshots at the same point
     // during the fade.
     branch.setBoolPref("layout.testing.overlay-scrollbars.always-visible", true);
 }
 
 var windowListener = {
     onOpenWindow: function(aWindow) {