Bug 613147 - Set the right pref before testing scroll zooming. a=test-only
authorMarkus Stange <mstange@themasta.com>
Sat, 27 Nov 2010 00:30:32 +0100
changeset 58319 118d61cdfb06a54c1cdfa98515a4e89e799f2303
parent 58318 0e6b8ae8eb21087ff8e8adb64fb1a6621081ecde
child 58320 64188998417c19a5764d89aab9f56d1c70effe07
push id17244
push usermstange@themasta.com
push dateMon, 29 Nov 2010 14:19:11 +0000
treeherdermozilla-central@a5500a756268 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstest-only
bugs613147
milestone2.0b8pre
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 613147 - Set the right pref before testing scroll zooming. a=test-only
content/events/test/test_bug574663.html
--- a/content/events/test/test_bug574663.html
+++ b/content/events/test/test_bug574663.html
@@ -102,28 +102,32 @@ function runTest() {
 function initPrefs()
 {
   netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
   var prefSvc = Components.classes["@mozilla.org/preferences-service;1"].
                   getService(Components.interfaces.nsIPrefBranch2);
   // Disables the app level scroll acceleration
   prefSvc.setIntPref("mousewheel.acceleration.start", -1);
   prefSvc.setBoolPref("mousewheel.system_scroll_override_on_root_content.enabled", false);
+  // Enable zooming for ctrl-scrolling
+  prefSvc.setIntPref("mousewheel.withcontrolkey.action", 3);
 }
 
 function clearPrefs()
 {
   netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
   var prefSvc = Components.classes["@mozilla.org/preferences-service;1"].
                   getService(Components.interfaces.nsIPrefBranch2);
 
   if (prefSvc.prefHasUserValue("mousewheel.acceleration.start"))
     prefSvc.clearUserPref("mousewheel.acceleration.start");
   if (prefSvc.prefHasUserValue("mousewheel.system_scroll_override_on_root_content.enabled"))
     prefSvc.clearUserPref("mousewheel.system_scroll_override_on_root_content.enabled");
+  if (prefSvc.prefHasUserValue("mousewheel.withcontrolkey.action"))
+    prefSvc.clearUserPref("mousewheel.withcontrolkey.action");
 }
 
 window.onload = function () {
   initPrefs();
   SimpleTest.executeSoon(runTest);
 }
 
 SimpleTest.waitForExplicitFinish();