[tbb-commits] [tor-browser/esr24] Bug 997820 - Disable telemetry in tests. r=ted, a=test-only

mikeperry at torproject.org mikeperry at torproject.org
Fri Aug 29 05:26:40 UTC 2014


commit 4fdb5662d96302066846bc29ba4c06f2633dd610
Author: Nathan Froyd <froydnj at gmail.com>
Date:   Fri Apr 18 11:03:00 2014 -0400

    Bug 997820 - Disable telemetry in tests. r=ted, a=test-only
---
 js/src/tests/user.js               |    2 +-
 layout/tools/reftest/runreftest.py |    4 ++++
 testing/profiles/prefs_general.js  |    3 +++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/js/src/tests/user.js b/js/src/tests/user.js
index a5c88b1..8849221 100755
--- a/js/src/tests/user.js
+++ b/js/src/tests/user.js
@@ -26,4 +26,4 @@ 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);
diff --git a/layout/tools/reftest/runreftest.py b/layout/tools/reftest/runreftest.py
index 88c3199..70323a7 100644
--- a/layout/tools/reftest/runreftest.py
+++ b/layout/tools/reftest/runreftest.py
@@ -71,6 +71,10 @@ class RefTest(object):
       prefsFile.write('user_pref("reftest.filter", %s);\n' % self.makeJSString(options.filter))
     prefsFile.write('user_pref("reftest.focusFilterMode", %s);\n' % self.makeJSString(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:
diff --git a/testing/profiles/prefs_general.js b/testing/profiles/prefs_general.js
index 3032a65..44b29b1 100644
--- a/testing/profiles/prefs_general.js
+++ b/testing/profiles/prefs_general.js
@@ -141,3 +141,6 @@ user_pref("media.webaudio.legacy.AudioParam", true);
 user_pref("media.webaudio.legacy.BiquadFilterNode", true);
 user_pref("media.webaudio.legacy.PannerNode", true);
 user_pref("media.webaudio.legacy.OscillatorNode", true);
+
+// 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/');





More information about the tbb-commits mailing list