Bug 1497482 [wpt PR 13431] - Revert "Resubmit cr/1261477", a=testonly
authorOlga Sharonova <olka@chromium.org>
Thu, 11 Oct 2018 09:32:21 +0000
changeset 496793 6de808fa765f420d6b82ba481f62d2926f36cc59
parent 496792 74e38368a4a8a37d5d6723e32e731403c82f3f3c
child 496794 c0550acd58bdb9826bc26a58031d647094ba39e5
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1497482, 13431, 1261477, 893511, 1264640, 597106, 1270736, 597883
milestone64.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 1497482 [wpt PR 13431] - Revert "Resubmit cr/1261477", a=testonly Automatic update from web-platform-testsRevert "Resubmit cr/1261477" This reverts commit e2d1946acc8a4c2e0651958d663ef04c3eefe202. Reason for revert: FindIt identified it as a source of flakiness in crbug/893511 Bug: 893511 Original change's description: > Resubmit cr/1261477 > > I reproduced the failure locally, and then re-ran with the changes 100 > time successfully > > TBR=peter@chromium.org > > Change-Id: Ieb60211fcd9c6beb1aec2b152f298335c4d9178b > Reviewed-on: https://chromium-review.googlesource.com/c/1264640 > Reviewed-by: Mugdha Lakhani <nator@chromium.org> > Commit-Queue: Rayan Kanso <rayankans@chromium.org> > Cr-Commit-Position: refs/heads/master@{#597106} TBR=nator@chromium.org,rayankans@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I8e0d0d5339f3f2ea8106dc76bf5bf7d4b8f0d243 Reviewed-on: https://chromium-review.googlesource.com/c/1270736 Reviewed-by: Olga Sharonova <olka@chromium.org> Commit-Queue: Olga Sharonova <olka@chromium.org> Cr-Commit-Position: refs/heads/master@{#597883} -- wpt-commits: 63ef84e18161b7ce0f11d166553f090913d4d1c3 wpt-pr: 13431
testing/web-platform/tests/background-fetch/abort.https.window.js
testing/web-platform/tests/background-fetch/service_workers/sw.js
deleted file mode 100644
--- a/testing/web-platform/tests/background-fetch/abort.https.window.js
+++ /dev/null
@@ -1,50 +0,0 @@
-// META: script=/service-workers/service-worker/resources/test-helpers.sub.js
-// META: script=resources/utils.js
-'use strict';
-
-// Covers basic functionality provided by BackgroundFetchManager.abort().
-// https://wicg.github.io/background-fetch/#background-fetch-registration-abort
-
-backgroundFetchTest(async (test, backgroundFetch) => {
-  const registration = await backgroundFetch.fetch(
-      uniqueId(),
-      ['resources/feature-name.txt', '/serviceworker/resources/slow-response.php']);
-
-  assert_true(await registration.abort());
-  assert_false(await registration.abort());
-
-}, 'Aborting the same registration twice fails');
-
-backgroundFetchTest(async (test, backgroundFetch) => {
-  const registration = await backgroundFetch.fetch(
-      uniqueId(),
-      ['resources/feature-name.txt', '/serviceworker/resources/slow-response.php']);
-  const resultPromise = getMessageFromServiceWorker();
-
-  await new Promise(resolve => {
-    registration.onprogress = async (e) => {
-      // The size of the first file.
-      if (e.target.downloaded < 16)
-        return;
-
-      // At this point the first file is downloaded.
-
-      assert_true(await registration.abort());
-
-      const {type, eventRegistration, results} = await resultPromise;
-
-      assert_equals(eventRegistration.result, 'failure');
-      assert_equals(eventRegistration.failureReason, 'aborted');
-
-      assert_equals(type, 'backgroundfetchabort');
-      assert_equals(results.length, 1);
-
-      assert_true(results[0].url.includes('resources/feature-name.txt'));
-      assert_equals(results[0].status, 200);
-      assert_equals(results[0].text, 'Background Fetch');
-
-      resolve();
-    };
-  });
-
-}, 'Calling BackgroundFetchRegistration.abort sets the correct fields and responses are still available');
\ No newline at end of file
--- a/testing/web-platform/tests/background-fetch/service_workers/sw.js
+++ b/testing/web-platform/tests/background-fetch/service_workers/sw.js
@@ -22,9 +22,8 @@ function handleBackgroundFetchUpdateEven
         const registrationCopy = cloneRegistration(event.registration);
         sendMessageToDocument(
           { type: event.type, eventRegistration: registrationCopy, results })
       }));
 }
 
 self.addEventListener('backgroundfetchsuccess', handleBackgroundFetchUpdateEvent);
 self.addEventListener('backgroundfetchfail', handleBackgroundFetchUpdateEvent);
-self.addEventListener('backgroundfetchabort', handleBackgroundFetchUpdateEvent);