Bug 1024588 - Turn off useragent updates for tests to avoid hitting the network. r=jmaher, a=test-only
authorNathan Froyd <froydnj@mozilla.com>
Thu, 12 Jun 2014 15:14:43 -0400
changeset 207046 e6bd7a69caefa047cdba8cc3e79130320ce0a3a1
parent 207045 fe96d87135d327f90e8517fb1bf73f291d10ddc5
child 207047 2380a4e88dca7a3bfc22691e1bf4d354dd000715
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher, test-only
bugs1024588
milestone32.0a2
Bug 1024588 - Turn off useragent updates for tests to avoid hitting the network. r=jmaher, a=test-only
js/src/tests/user.js
layout/tools/reftest/runreftest.py
testing/profiles/prefs_general.js
--- a/js/src/tests/user.js
+++ b/js/src/tests/user.js
@@ -22,8 +22,9 @@ user_pref("javascript.options.strict", f
 user_pref("javascript.options.werror", false);
 user_pref("toolkit.startup.max_resumed_crashes", -1);
 user_pref("security.turn_off_all_security_so_that_viruses_can_take_over_this_computer", true);
 user_pref("toolkit.telemetry.enabled", false);
 user_pref("browser.safebrowsing.enabled", false);
 user_pref("browser.safebrowsing.malware.enabled", false);
 user_pref("browser.snippets.enabled", false);
 user_pref("browser.snippets.syncPromo.enabled", false);
+user_pref("general.useragent.updates.enabled", false);
--- a/layout/tools/reftest/runreftest.py
+++ b/layout/tools/reftest/runreftest.py
@@ -169,16 +169,18 @@ class RefTest(object):
     # server in the middle of the tests.
     prefs['toolkit.telemetry.enabled'] = False
     # Likewise for safebrowsing.
     prefs['browser.safebrowsing.enabled'] = False
     prefs['browser.safebrowsing.malware.enabled'] = False
     # And for snippets.
     prefs['browser.snippets.enabled'] = False
     prefs['browser.snippets.syncPromo.enabled'] = False
+    # And for useragent updates.
+    prefs['general.useragent.updates.enabled'] = False
 
     if options.e10s:
       prefs['browser.tabs.remote.autostart'] = True
 
     for v in options.extraPrefs:
       thispref = v.split('=')
       if len(thispref) < 2:
         print "Error: syntax error in --setpref=" + v
--- a/testing/profiles/prefs_general.js
+++ b/testing/profiles/prefs_general.js
@@ -167,16 +167,19 @@ user_pref("pbackground.testing", true);
 
 // Enable webapps testing mode, which bypasses native installation.
 user_pref("browser.webapps.testing", true);
 
 // Disable android snippets
 user_pref("browser.snippets.enabled", false);
 user_pref("browser.snippets.syncPromo.enabled", false);
 
+// Disable useragent updates.
+user_pref("general.useragent.updates.enabled", false);
+
 // Do not turn HTTP cache v2 for our infra tests (some tests are failing)
 user_pref("browser.cache.use_new_backend_temp", false);
 
 // Don't connect to Yahoo! for RSS feed tests.
 // en-US only uses .types.0.uri, but set all of them just to be sure.
 user_pref('browser.contentHandlers.types.0.uri', 'http://test1.example.org/rss?url=%%s')
 user_pref('browser.contentHandlers.types.1.uri', 'http://test1.example.org/rss?url=%%s')
 user_pref('browser.contentHandlers.types.2.uri', 'http://test1.example.org/rss?url=%%s')