Bug 997820 - Disable telemetry in tests. r=ted, a=test-only
authorNathan Froyd <froydnj@gmail.com>
Fri, 18 Apr 2014 11:03:00 -0400
changeset 192171 a7ab7384526e
parent 192170 69fcc2d9c81b
child 192172 5dfe868c0bea
push id3508
push userryanvm@gmail.com
push date2014-04-29 13:25 +0000
treeherdermozilla-beta@5dfe868c0bea [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted, test-only
bugs997820
milestone30.0
Bug 997820 - Disable telemetry in tests. r=ted, 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
@@ -17,9 +17,9 @@ user_pref("browser.warnOnQuit", false);
 user_pref("browser.cache.check_doc_frequency", 1);
 user_pref("extensions.checkCompatibility", false);
 user_pref("extensions.checkUpdateSecurity", false);
 user_pref("browser.EULA.override", true);
 user_pref("javascript.options.strict", false);
 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);
--- a/layout/tools/reftest/runreftest.py
+++ b/layout/tools/reftest/runreftest.py
@@ -158,16 +158,20 @@ class RefTest(object):
     if options.logFile:
       prefs['reftest.logFile'] = options.logFile
     if options.ignoreWindowSize:
       prefs['reftest.ignoreWindowSize'] = True
     if options.filter:
       prefs['reftest.filter'] = options.filter
     prefs['reftest.focusFilterMode'] = options.focusFilterMode
 
+    # Ensure that telemetry is disabled, so we don't connect to the telemetry
+    # server in the middle of the tests.
+    prefs['toolkit.telemetry.enabled'] = False
+
     for v in options.extraPrefs:
       thispref = v.split('=')
       if len(thispref) < 2:
         print "Error: syntax error in --setpref=" + v
         sys.exit(1)
       prefs[thispref[0]] = mozprofile.Preferences.cast(thispref[1].strip())
 
     # install the reftest extension bits into the profile
--- a/testing/profiles/prefs_general.js
+++ b/testing/profiles/prefs_general.js
@@ -176,8 +176,11 @@ user_pref("browser.cache.use_new_backend
 // 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')
 user_pref('browser.contentHandlers.types.3.uri', 'http://test1.example.org/rss?url=%%s')
 user_pref('browser.contentHandlers.types.4.uri', 'http://test1.example.org/rss?url=%%s')
 user_pref('browser.contentHandlers.types.5.uri', 'http://test1.example.org/rss?url=%%s')
+
+// We want to collect telemetry, but we don't want to send in the results.
+user_pref('toolkit.telemetry.server', 'https://%(server)s/telemetry-dummy/');