Bug 976563 - Force-enable double-tap-to-zoom to restore talos baseline. r=wesj a=test-only
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 07 Apr 2014 10:09:45 -0400
changeset 192675 77cb0b448bb28d0ea7a8001833d2e1d79d413eb2
parent 192674 7906c1b48e0d53f3853911f7ea2e13c83f7e0ffb
child 192676 6c54582ca278c4ad7f9d9bdb4c1e552d688bb18a
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj, test-only
bugs976563
milestone30.0a2
Bug 976563 - Force-enable double-tap-to-zoom to restore talos baseline. r=wesj a=test-only
mobile/android/base/tests/testCheck2.java
--- a/mobile/android/base/tests/testCheck2.java
+++ b/mobile/android/base/tests/testCheck2.java
@@ -1,19 +1,32 @@
 package org.mozilla.gecko.tests;
 
+import org.json.JSONObject;
+
 public class testCheck2 extends PixelTest {
     @Override
     protected int getTestType() {
         return TEST_TALOS;
     }
 
     public void testCheck2() {
         String url = getAbsoluteUrl("/startup_test/fennecmark/cnn/cnn.com/index.html");
 
+        // Enable double-tap zooming
+        JSONObject jsonPref = new JSONObject();
+        try {
+            jsonPref.put("name", "browser.ui.zoom.force-user-scalable");
+            jsonPref.put("type", "bool");
+            jsonPref.put("value", true);
+            setPreferenceAndWaitForChange(jsonPref);
+        } catch (Exception ex) {
+            mAsserter.ok(false, "exception in testCheck2", ex.toString());
+        }
+
         blockForGeckoReady();
         loadAndPaint(url);
 
         mDriver.setupScrollHandling();
 
         /*
          * for this test, we load the timecube page, and replay a recorded sequence of events
          * that is a user panning/zooming around the page. specific things in the sequence