Backed out changeset 8d71eb212b9a (bug 1169819)
authorWes Kocher <wkocher@mozilla.com>
Thu, 11 Jun 2015 17:57:49 -0700
changeset 248369 dace20e4271c2689ebe373a5bf2fd1d484348fdd
parent 248368 8d71eb212b9ae93fd30a32091af584360fc294fa
child 248370 b5f4fa1abe42999edb1ceae7d0563faef8e20d95
push id60957
push userkwierso@gmail.com
push dateFri, 12 Jun 2015 01:00:21 +0000
treeherdermozilla-inbound@437700eb4d87 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1169819
milestone41.0a1
backs out8d71eb212b9ae93fd30a32091af584360fc294fa
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 8d71eb212b9a (bug 1169819)
dom/workers/moz.build
dom/workers/test/serviceworkers/browser.ini
dom/workers/test/serviceworkers/browser_base_force_refresh.html
dom/workers/test/serviceworkers/browser_cached_force_refresh.html
dom/workers/test/serviceworkers/browser_force_refresh.js
dom/workers/test/serviceworkers/browser_force_refresh_worker.js
--- a/dom/workers/moz.build
+++ b/dom/workers/moz.build
@@ -117,17 +117,13 @@ MOCHITEST_MANIFESTS += [
     'test/serviceworkers/mochitest.ini',
 ]
 
 MOCHITEST_CHROME_MANIFESTS += [
     'test/chrome.ini',
     'test/serviceworkers/chrome.ini'
 ]
 
-BROWSER_CHROME_MANIFESTS += [
-    'test/serviceworkers/browser.ini',
-]
-
 XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini']
 
 BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
 
 TEST_DIRS += ['test/gtest']
deleted file mode 100644
--- a/dom/workers/test/serviceworkers/browser.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[DEFAULT]
-support-files =
-  browser_base_force_refresh.html
-  browser_cached_force_refresh.html
-  browser_force_refresh_worker.js
-
-[browser_force_refresh.js]
-skip-if = e10s
deleted file mode 100644
--- a/dom/workers/test/serviceworkers/browser_base_force_refresh.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
-  Any copyright is dedicated to the Public Domain.
-  http://creativecommons.org/publicdomain/zero/1.0/
--->
-<!DOCTYPE HTML>
-<html>
-<head>
-</head>
-<body>
-<script type="text/javascript">
-addEventListener('load', function(event) {
-  navigator.serviceWorker.register('browser_force_refresh_worker.js').then(function(swr) {
-    if (!swr) {
-      return;
-    }
-    var custom = new Event('base-register', { bubbles: true });
-    document.dispatchEvent(custom);
-  });
-
-  navigator.serviceWorker.ready.then(function() {
-    var custom = new Event('base-sw-ready', { bubbles: true });
-    document.dispatchEvent(custom);
-  });
-
-  var custom = new Event('base-load', { bubbles: true });
-  document.dispatchEvent(custom);
-});
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/dom/workers/test/serviceworkers/browser_cached_force_refresh.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!--
-  Any copyright is dedicated to the Public Domain.
-  http://creativecommons.org/publicdomain/zero/1.0/
--->
-<!DOCTYPE HTML>
-<html>
-<head>
-</head>
-<body>
-<script type="text/javascript">
-addEventListener('load', function(event) {
-  var custom = new Event('cached-load', { bubbles: true });
-  document.dispatchEvent(custom);
-});
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/dom/workers/test/serviceworkers/browser_force_refresh.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/",
-                                                    "http://mochi.test:8888/")
-
-function refresh() {
-  EventUtils.synthesizeKey('R', { ctrlKey: true });
-}
-
-function forceRefresh() {
-  EventUtils.synthesizeKey('R', { ctrlKey: true, shiftKey: true });
-}
-
-function test() {
-  waitForExplicitFinish();
-  SpecialPowers.pushPrefEnv({'set': [['dom.serviceWorkers.enabled', true],
-                                     ['dom.serviceWorkers.exemptFromPerDomainMax', true],
-                                     ['dom.serviceWorkers.testing.enabled', true],
-                                     ['dom.caches.enabled', true]]},
-                            function() {
-    var url = gTestRoot + 'browser_base_force_refresh.html';
-    var tab = gBrowser.addTab(url);
-    gBrowser.selectedTab = tab;
-
-    ok(true);
-
-    var cachedLoad = false;
-
-    function eventHandler(event) {
-      if (event.type === 'base-load') {
-        if (cachedLoad) {
-          gBrowser.removeTab(tab);
-          executeSoon(finish);
-        }
-      } else if (event.type === 'base-register') {
-        ok(!cachedLoad, 'cached load should not occur before base register');
-        refresh();
-      } else if (event.type === 'base-sw-ready') {
-        ok(!cachedLoad, 'cached load should not occur before base ready');
-        refresh();
-      } else if (event.type === 'cached-load') {
-        ok(!cachedLoad, 'cached load should not occur twice');
-        cachedLoad = true;
-        forceRefresh();
-      }
-
-      return;
-    }
-
-    addEventListener('base-load', eventHandler, true, true);
-    addEventListener('base-register', eventHandler, true, true);
-    addEventListener('base-sw-ready', eventHandler, true, true);
-    addEventListener('cached-load', eventHandler, true, true);
-  });
-}
deleted file mode 100644
--- a/dom/workers/test/serviceworkers/browser_force_refresh_worker.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var name = 'browserRefresherCache';
-
-self.addEventListener('install', function(event) {
-  event.waitUntil(
-    Promise.all([caches.open(name),
-                 fetch('./browser_cached_force_refresh.html')]).then(function(results) {
-      var cache = results[0];
-      var response = results[1];
-      return cache.put('./browser_base_force_refresh.html', response);
-    })
-  );
-});
-
-self.addEventListener('fetch', function (event) {
-  event.respondWith(
-    caches.open(name).then(function(cache) {
-      return cache.match(event.request);
-    }).then(function(response) {
-      return response || fetch(event.request);
-    })
-  );
-});