Bug 694644 Turn off locale picker when running reftest on mobile r=jmaher
authorClint Talbert <ctalbert@mozilla.com>
Tue, 18 Oct 2011 09:16:24 -0400
changeset 78888 5321159aac61a50b4b7274aec884da3923876834
parent 78887 bfff1c1f8ed929b3ecd69d8a70e6adf34150f016
child 78889 9252c9e484fc7004d1b82e04e007a1853400ec93
push id2743
push userctalbert@mozilla.com
push dateTue, 18 Oct 2011 13:16:51 +0000
treeherdermozilla-inbound@5321159aac61 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs694644
milestone10.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 694644 Turn off locale picker when running reftest on mobile r=jmaher
layout/tools/reftest/remotereftest.py
--- a/layout/tools/reftest/remotereftest.py
+++ b/layout/tools/reftest/remotereftest.py
@@ -326,24 +326,32 @@ class RemoteReftest(RefTest):
         options.utilityPath = remoteUtilityPath
          
     def stopWebServer(self, options):
         self.server.stop()
 
     def createReftestProfile(self, options, profileDir):
         RefTest.createReftestProfile(self, options, profileDir, server=options.remoteWebServer)
 
+        # Turn off the locale picker screen
+        fhandle = open(os.path.join(profileDir, "user.js"), 'a')
+        fhandle.write("""
+user_pref("browser.firstrun.show.localepicker", false);
+""")
+
         #workaround for jsreftests.
         if options.enablePrivilege:
-          fhandle = open(os.path.join(profileDir, "user.js"), 'a')
           fhandle.write("""
 user_pref("capability.principal.codebase.p2.granted", "UniversalPreferencesWrite UniversalXPConnect UniversalBrowserWrite UniversalPreferencesRead UniversalBrowserRead");
 user_pref("capability.principal.codebase.p2.id", "http://%s:%s");
 """ % (options.remoteWebServer, options.httpPort))
-          fhandle.close()
+
+        # Close the file
+        fhandle.close()
+
 
         if (self._devicemanager.pushDir(profileDir, options.remoteProfile) == None):
             raise devicemanager.FileError("Failed to copy profiledir to device")
 
     def copyExtraFilesToProfile(self, options, profileDir):
         RefTest.copyExtraFilesToProfile(self, options, profileDir)
         if (self._devicemanager.pushDir(profileDir, options.remoteProfile) == None):
             raise devicemanager.FileError("Failed to copy extra files to device")