Backed out changeset 76caa4994120 (bug 506975)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Mon, 20 Oct 2014 12:59:48 +0200
changeset 235598 739a5fce8c1d22455fb230d2c2d7acb31352ac31
parent 235597 7310cc81927ebb56a7a75bcedf83df5008444ccb
child 235599 ca94702ad5cb01c84a3bb964d63e83d5ea9038a3
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs506975
milestone36.0a1
backs out76caa49941209748033572ce07dd34a44df2125d
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
Backed out changeset 76caa4994120 (bug 506975)
browser/components/sessionstore/test/browser.ini
browser/components/sessionstore/test/browser_sessionStorage_battery.js
--- a/browser/components/sessionstore/test/browser.ini
+++ b/browser/components/sessionstore/test/browser.ini
@@ -130,17 +130,16 @@ skip-if = e10s
 [browser_490040.js]
 [browser_491168.js]
 # Disabled for too many intermittent failures.
 # Can be re-enabled once bug 930202 lands.
 skip-if = true
 [browser_491577.js]
 [browser_495495.js]
 [browser_500328.js]
-[browser_sessionStorage_battery.js]
 [browser_514751.js]
 [browser_522375.js]
 [browser_522545.js]
 [browser_524745.js]
 [browser_528776.js]
 [browser_579868.js]
 [browser_579879.js]
 [browser_581937.js]
deleted file mode 100644
--- a/browser/components/sessionstore/test/browser_sessionStorage_battery.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-
-const URL = "http://mochi.test:8888/?rand=";
-const PREF_BATTERY = "browser.sessionstore.interval_battery";
-const PREF_CHARGING = "browser.sessionstore.interval";
-const WAIT = 2000;
-const LARGE_DURATION = 60000;
-const SMALL_DURATION = 100;
-let {Battery, Debugging} = Cu.import("resource://gre/modules/Battery.jsm", {});
-
-/**
- * This test ensures that the session storage is saved at correct intervals
- * depending on the battery state
- */
-
-function promiseWait(time) {
-  return new Promise(resolve => {
-    setTimeout(resolve, time);
-  });
-}
-
-
-add_task(function* init() {
-  Debugging.fake = true;
-  Battery.charging = false;
-  Battery.chargingTime = Infinity;
-  Battery.dischargingTime = 50;
-
-  Services.prefs.setIntPref(PREF_BATTERY, SMALL_DURATION);
-  Services.prefs.setIntPref(PREF_CHARGING, LARGE_DURATION);
-
-  registerCleanupFunction(function () {
-    Services.prefs.clearUserPref(PREF_BATTERY);
-    Services.prefs.clearUserPref(PREF_CHARGING);
-    Debugging.fake = false;
-  });
-});
-
-add_task(function* runtest() {
-  let url = URL + Math.random();
-  let tab = gBrowser.addTab(url);
-  yield promiseWait(WAIT);
-  let storage = JSON.parse(ss.getTabState(tab));
-  is(storage.entries.length, 1, "sessionStorage correctly saved for non-charging battery state");
-  let state = yield OS.File.read(SessionFile.Paths.recovery, { encoding: "utf-8" });
-  ok(state.contains(url), "Sessionstore correctly saved to disk for non-charging battery state");
-  gBrowser.removeTab(tab);
-
-  Battery.charging = true;
-  Battery.chargingTime = 100;
-  Battery.dischargingTime = Infinity;
-  Services.prefs.setIntPref(PREF_BATTERY, LARGE_DURATION);
-  Services.prefs.setIntPref(PREF_CHARGING, SMALL_DURATION);
-
-  url = URL + Math.random();
-  tab = gBrowser.addTab(url);
-  yield promiseWait(WAIT);
-  storage = JSON.parse(ss.getTabState(tab));
-  is(storage.entries.length, 1, "sessionStorage correctly saved for charging battery state");
-  state = yield OS.File.read(SessionFile.Paths.recovery, { encoding: "utf-8" });
-  ok(state.contains(url), "Sessionstore correctly saved to disk for charging battery state")
-  gBrowser.removeTab(tab);
-});