Bug 1067845 - Clean up after browser_mozLoop_softStart.js. r=abr
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Tue, 16 Sep 2014 14:54:07 +0100
changeset 228676 baa2460daf87b462da11adbc4b89a1eafdef7aa6
parent 228675 f1d1f89e5bd5399c66bc24ed02bec3b556ce5203
child 228677 6f609219f77a60d6c31c1cfecd747bd98562ba9a
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersabr
bugs1067845
milestone35.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 1067845 - Clean up after browser_mozLoop_softStart.js. r=abr
browser/components/loop/test/mochitest/browser_mozLoop_softStart.js
--- a/browser/components/loop/test/mochitest/browser_mozLoop_softStart.js
+++ b/browser/components/loop/test/mochitest/browser_mozLoop_softStart.js
@@ -56,16 +56,23 @@ let runCheck = function(expectError) {
 }
 
 add_task(function* test_mozLoop_softStart() {
   // Set associated variables to proper values
   Services.prefs.setBoolPref("loop.throttled", true);
   Services.prefs.setCharPref("loop.soft_start_hostname", SOFT_START_HOSTNAME);
   Services.prefs.setIntPref("loop.soft_start_ticket_number", -1);
 
+  registerCleanupFunction(function () {
+    Services.prefs.clearUserPref("loop.throttled");
+    Services.prefs.clearUserPref("loop.soft_start");
+    Services.prefs.clearUserPref("loop.soft_start_hostname");
+    Services.prefs.clearUserPref("loop.soft_start_ticket_number");
+  });
+
   let throttled;
   let ticket;
 
   info("Ensure that we pick a valid ticket number.");
   yield runCheck();
   throttled = Services.prefs.getBoolPref("loop.throttled");
   ticket = Services.prefs.getIntPref("loop.soft_start_ticket_number");
   Assert.equal(MockButton.hidden, true, "Button should still be hidden");