Bug 1416879 - Part 0d: Move browser_multie10s_update.js into its own directory. r=bkelly
authorAndrew Sutherland <asutherland@asutherland.org>
Thu, 11 Jan 2018 10:31:17 -0500
changeset 450665 6e926521ce37cadc4fcbd3451542a7975446311e
parent 450664 7d66c4b6ab0d7dbea4ae2ebd7b843e0e7f95d057
child 450697 2dab1647f93321a1bb6f418495f55260f2eacc28
push id8531
push userryanvm@gmail.com
push dateFri, 12 Jan 2018 16:47:01 +0000
treeherdermozilla-beta@0bc627ade5a0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbkelly
bugs1416879, 1429794
milestone59.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 1416879 - Part 0d: Move browser_multie10s_update.js into its own directory. r=bkelly This test is unfortunately a victim of a multi-e10s unregister() race from browser_force_refresh and given the imminent multi-e10s cleanup that's going to happen, the more complicated alternatives aren't worth the effort versus just moving this test to its own directory. ..and now it's disabled too. Bug 1429794 tracks re-enabling.
dom/workers/moz.build
dom/workers/test/serviceworkers/browser.ini
dom/workers/test/serviceworkers/browser_multie10s_update.js
dom/workers/test/serviceworkers/file_multie10s_update.html
dom/workers/test/serviceworkers/isolated/README.md
dom/workers/test/serviceworkers/isolated/multi-e10s-update/browser.ini
dom/workers/test/serviceworkers/isolated/multi-e10s-update/browser_multie10s_update.js
dom/workers/test/serviceworkers/isolated/multi-e10s-update/file_multie10s_update.html
dom/workers/test/serviceworkers/isolated/multi-e10s-update/server_multie10s_update.sjs
dom/workers/test/serviceworkers/server_multie10s_update.sjs
--- a/dom/workers/moz.build
+++ b/dom/workers/moz.build
@@ -120,16 +120,17 @@ MOCHITEST_MANIFESTS += [
 
 MOCHITEST_CHROME_MANIFESTS += [
     'test/chrome.ini',
     'test/serviceworkers/chrome.ini'
 ]
 
 BROWSER_CHROME_MANIFESTS += [
     'test/serviceworkers/browser.ini',
+    'test/serviceworkers/isolated/multi-e10s-update/browser.ini',
 ]
 
 XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini']
 
 BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
 
 TEST_DIRS += ['test/gtest']
 
--- a/dom/workers/test/serviceworkers/browser.ini
+++ b/dom/workers/test/serviceworkers/browser.ini
@@ -3,26 +3,22 @@ support-files =
   browser_base_force_refresh.html
   browser_cached_force_refresh.html
   download/window.html
   download/worker.js
   download_canceled/page_download_canceled.html
   download_canceled/server-stream-download.sjs
   download_canceled/sw_download_canceled.js
   fetch.js
-  file_multie10s_update.html
   file_userContextId_openWindow.js
   force_refresh_browser_worker.js
   empty.html
   empty.js
-  server_multie10s_update.sjs
   utils.js
 
 [browser_devtools_serviceworker_interception.js]
 [browser_force_refresh.js]
 [browser_download.js]
 [browser_download_canceled.js]
-[browser_multie10s_update.js]
-skip-if = !e10s || os != "win" # Bug 1404914
 [browser_storage_permission.js]
 [browser_unregister_with_containers.js]
 [browser_userContextId_openWindow.js]
 skip-if = !e10s
new file mode 100644
--- /dev/null
+++ b/dom/workers/test/serviceworkers/isolated/README.md
@@ -0,0 +1,19 @@
+This directory contains tests that are flaky when run with other tests
+but that we don't want to disable and where it's not trivial to make
+the tests not flaky at this time, but we have a plan to fix them via
+systemic fixes that are improving the codebase rather than hacking a
+test until it works.
+
+This directory and ugly hack structure needs to exist because of
+multi-e10s propagation races that will go away when we finish
+implementing the multi-e10s overhaul for ServiceWorkers.  Most
+specifically, unregister() calls need to propagate across all
+content processes.  There are fixes on bug 1318142, but they're
+ugly and complicate things.
+
+Specific test notes and rationalizations:
+- multi-e10s-update: This test relies on there being no registrations
+  existing at its start.  The preceding test that induces the breakage
+  (`browser_force_refresh.js`) was made to clean itself up, but the
+  unregister() race issue is not easily/cleanly hacked around and this
+  test will itself become moot when the multi-e10s changes land.
new file mode 100644
--- /dev/null
+++ b/dom/workers/test/serviceworkers/isolated/multi-e10s-update/browser.ini
@@ -0,0 +1,8 @@
+[DEFAULT]
+support-files =
+  file_multie10s_update.html
+  server_multie10s_update.sjs
+
+[browser_multie10s_update.js]
+skip-if = true # bug 1429794 is to re-enable, then un-comment the below.
+#skip-if = !e10s # this is an e10s-only test.
\ No newline at end of file
rename from dom/workers/test/serviceworkers/browser_multie10s_update.js
rename to dom/workers/test/serviceworkers/isolated/multi-e10s-update/browser_multie10s_update.js
--- a/dom/workers/test/serviceworkers/browser_multie10s_update.js
+++ b/dom/workers/test/serviceworkers/isolated/multi-e10s-update/browser_multie10s_update.js
@@ -1,16 +1,17 @@
 "use strict";
 
 const { classes: Cc, interfaces: Ci, results: Cr } = Components;
 
 // Testing if 2 child processes are correctly managed when they both try to do
 // an SW update.
 
-const BASE_URI = "http://mochi.test:8888/browser/dom/workers/test/serviceworkers/";
+const BASE_URI =
+ "http://mochi.test:8888/browser/dom/workers/test/serviceworkers/isolated/multi-e10s-update/";
 
 add_task(async function test_update() {
   info("Setting the prefs to having multi-e10s enabled");
   await SpecialPowers.pushPrefEnv({"set": [
     ["dom.ipc.processCount", 4],
     ["dom.serviceWorkers.enabled", true],
     ["dom.serviceWorkers.testing.enabled", true],
   ]});
rename from dom/workers/test/serviceworkers/file_multie10s_update.html
rename to dom/workers/test/serviceworkers/isolated/multi-e10s-update/file_multie10s_update.html
rename from dom/workers/test/serviceworkers/server_multie10s_update.sjs
rename to dom/workers/test/serviceworkers/isolated/multi-e10s-update/server_multie10s_update.sjs