# HG changeset patch # User Andrew Halberstadt # Date 1538766747 0 # Node ID a3d2029e7b26c3ae312b17f7ab11916eec5de355 # Parent 7a3d9b9a1a968f7d86d80bb134c4ab5abfbe5a2f Bug 1470266 - [ci] Schedule serviceworker-e10s mochitest tasks with linux64/debug on mozilla-central, r=jmaher This duplicates all the mochitest, based tests except with dom.serviceWorkers.parent_intercept set to true. For now they are only run on mozilla-central with linux64/debug. Differential Revision: https://phabricator.services.mozilla.com/D7641 diff --git a/dom/push/test/mochitest.ini b/dom/push/test/mochitest.ini --- a/dom/push/test/mochitest.ini +++ b/dom/push/test/mochitest.ini @@ -20,10 +20,11 @@ skip-if = os == "win" # Bug 1373346 [test_multiple_register_different_scope.html] [test_subscription_change.html] skip-if = os == "win" # Bug 1373346 [test_data.html] skip-if = os == "win" # Bug 1373346 [test_try_registering_offline_disabled.html] skip-if = os == "win" # Bug 1373346 [test_serviceworker_lifetime.html] -skip-if = os == "win" # Bug 1373346 +skip-if = serviceworker_e10s || !e10s || os == "win" # e10s: Bug 1433689, Windows: Bug 1373346 [test_error_reporting.html] +skip-if = serviceworker_e10s diff --git a/dom/serviceworkers/test/browser.ini.1470266.later b/dom/serviceworkers/test/browser.ini.1470266.later new file mode 100644 --- /dev/null +++ b/dom/serviceworkers/test/browser.ini.1470266.later @@ -0,0 +1,24 @@ +--- browser.ini ++++ browser.ini +@@ -11,18 +11,20 @@ support-files = + file_userContextId_openWindow.js + force_refresh_browser_worker.js + empty.html + empty.js + storage_recovery_worker.sjs + utils.js + + [browser_devtools_serviceworker_interception.js] ++skip-if = serviceworker_e10s + [browser_force_refresh.js] + [browser_download.js] + [browser_download_canceled.js] + skip-if = verify + [browser_storage_permission.js] + skip-if = (verify && debug && (os == 'win' || os == 'mac')) + [browser_storage_recovery.js] ++skip-if = serviceworker_e10s + [browser_unregister_with_containers.js] + [browser_userContextId_openWindow.js] +-skip-if = !e10s ++skip-if = !e10s || serviceworker_e10s diff --git a/dom/serviceworkers/test/mochitest.ini.1470266.later b/dom/serviceworkers/test/mochitest.ini.1470266.later new file mode 100644 --- /dev/null +++ b/dom/serviceworkers/test/mochitest.ini.1470266.later @@ -0,0 +1,14 @@ +--- mochitest.ini ++++ mochitest.ini +@@ -1,10 +1,11 @@ + [DEFAULT] + ++skip-if = serviceworker_e10s + support-files = + worker.js + worker2.js + worker3.js + fetch_event_worker.js + parse_error_worker.js + activate_event_error_worker.js + install_event_worker.js diff --git a/testing/mochitest/runrobocop.py b/testing/mochitest/runrobocop.py --- a/testing/mochitest/runrobocop.py +++ b/testing/mochitest/runrobocop.py @@ -237,16 +237,17 @@ class RobocopTestRunner(MochitestDesktop self.options.extensionsToExclude.extend([ 'mochikit@mozilla.org', 'worker-test@mozilla.org.xpi', 'workerbootstrap-test@mozilla.org.xpi', 'indexedDB-test@mozilla.org.xpi', ]) + self.extraPrefs = self.parseExtraPrefs(self.options.extraPrefs) manifest = MochitestDesktop.buildProfile(self, self.options) self.localProfile = self.options.profilePath self.log.debug("Profile created at %s" % self.localProfile) # some files are not needed for robocop; save time by not pushing os.remove(os.path.join(self.localProfile, 'userChrome.css')) try: self.device.push(self.localProfile, self.remoteProfileCopy) except Exception: diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py --- a/testing/mochitest/runtests.py +++ b/testing/mochitest/runtests.py @@ -910,17 +910,17 @@ class MochitestDesktop(object): self.result = {} self.start_script = os.path.join(here, 'start_desktop.js') def environment(self, **kwargs): kwargs['log'] = self.log return test_environment(**kwargs) - def extraPrefs(self, prefs): + def parseExtraPrefs(self, prefs): """Interpolate extra preferences from option strings""" try: prefs = dict(parseKeyValue(prefs, context='--setpref=')) except KeyValueParseError as e: print(str(e)) sys.exit(1) @@ -1944,17 +1944,17 @@ toolbar#nav-bar { # See if we should use fake media devices. if options.useTestMediaDevices: prefs['media.audio_loopback_dev'] = self.mediaDevices['audio'] prefs['media.video_loopback_dev'] = self.mediaDevices['video'] self.profile.set_preferences(prefs) # Extra prefs from --setpref - self.profile.set_preferences(self.extraPrefs(options.extraPrefs)) + self.profile.set_preferences(self.extraPrefs) return manifest def getGMPPluginPath(self, options): if options.gmp_path: return options.gmp_path gmp_parentdirs = [ # For local builds, GMP plugins will be under dist/bin. @@ -2563,23 +2563,30 @@ toolbar#nav-bar { self.log.info(':::') self.log.info('::: Test verification %s' % finalResult) self.log.info(':::') return 0 def runTests(self, options): """ Prepare, configure, run tests and cleanup """ + self.extraPrefs = self.parseExtraPrefs(options.extraPrefs) # a11y and chrome tests don't run with e10s enabled in CI. Need to set # this here since |mach mochitest| sets the flavor after argument parsing. if options.flavor in ('a11y', 'chrome'): options.e10s = False - mozinfo.update({"e10s": options.e10s}) # for test manifest parsing. - mozinfo.update({"headless": options.headless}) # for test manifest parsing. + + # for test manifest parsing. + mozinfo.update({ + "e10s": options.e10s, + "headless": options.headless, + "serviceworker_e10s": self.extraPrefs.get( + 'dom.serviceWorkers.parent_intercept', False), + }) self.setTestRoot(options) # Despite our efforts to clean up servers started by this script, in practice # we still see infrequent cases where a process is orphaned and interferes # with future tests, typically because the old server is keeping the port in use. # Try to avoid those failures by checking for and killing servers before # trying to start new ones. @@ -2595,27 +2602,28 @@ toolbar#nav-bar { # Until we have all green, this does not run on jetpack*, or a11y (for perf reasons) if not options.runByManifest: return self.runMochitests(options, [t['path'] for t in tests]) # code for --run-by-manifest manifests = set(t['manifest'] for t in tests) result = 0 - origPrefs = options.extraPrefs[:] + + origPrefs = self.extraPrefs.copy() for m in sorted(manifests): self.log.info("Running manifest: {}".format(m)) prefs = list(self.prefs_by_manifest[m])[0] - options.extraPrefs = origPrefs[:] + self.extraPrefs = origPrefs.copy() if prefs: prefs = prefs.strip().split() self.log.info("The following extra prefs will be set:\n {}".format( '\n '.join(prefs))) - options.extraPrefs.extend(prefs) + self.extraPrefs.update(self.parseExtraPrefs(prefs)) # If we are using --run-by-manifest, we should not use the profile path (if) provided # by the user, since we need to create a new directory for each run. We would face # problems if we use the directory provided by the user. tests_in_manifest = [t['path'] for t in tests if t['manifest'] == m] res = self.runMochitests(options, tests_in_manifest) result = result or res @@ -2785,16 +2793,18 @@ toolbar#nav-bar { testURL = self.buildTestURL(options, scheme=scheme) self.buildURLOptions(options, self.browserEnv) if self.urlOpts: testURL += "?" + "&".join(self.urlOpts) self.log.info("runtests.py | Running with e10s: {}".format(options.e10s)) + self.log.info("runtests.py | Running with serviceworker_e10s: {}".format( + mozinfo.info.get('serviceworker_e10s', False))) self.log.info("runtests.py | Running tests: start.\n") ret, _ = self.runApp( testURL, self.browserEnv, options.app, profile=self.profile, extraArgs=options.browserArgs, utilityPath=options.utilityPath, diff --git a/testing/mochitest/tests/Harness_sanity/mochitest.ini b/testing/mochitest/tests/Harness_sanity/mochitest.ini --- a/testing/mochitest/tests/Harness_sanity/mochitest.ini +++ b/testing/mochitest/tests/Harness_sanity/mochitest.ini @@ -5,18 +5,20 @@ skip-if = true #depends on fix for bug 1 [test_createFiles.html] [test_importInMainProcess.html] support-files = importtesting_chromescript.js [test_sanity.html] [test_sanityException.html] [test_sanityException2.html] [test_sanityParams.html] [test_sanityRegisteredServiceWorker.html] +skip-if = serviceworker_e10s support-files = empty.js [test_sanityRegisteredServiceWorker2.html] +skip-if = verify || serviceworker_e10s support-files = empty.js [test_sanityWindowSnapshot.html] [test_SpecialPowersExtension.html] [test_SpecialPowersExtension2.html] support-files = file_SpecialPowersFrame1.html [test_SpecialPowersPushPermissions.html] support-files = specialPowers_framescript.js