Bug 1496739 [wpt PR 13391] - [Background Fetch] Reject calls to get with invalid IDs., a=testonly
authorRayan Kanso <rayankans@chromium.org>
Thu, 11 Oct 2018 09:31:05 +0000
changeset 489247 bcd7b358b492a08052588e078fb11a8c371c01d1
parent 489246 ad04238da3b66b40bbf8c0609e8d55469652b974
child 489248 ae5884fdd537dd3ebcffbd4a36d33f5284ada8b1
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewerstestonly
bugs1496739, 13391, 1264541, 597115
milestone64.0a1
Bug 1496739 [wpt PR 13391] - [Background Fetch] Reject calls to get with invalid IDs., a=testonly Automatic update from web-platform-tests[Background Fetch] Reject calls to get with invalid IDs. Explicitly check for empty strings and add a WPT test. TBR=peter@chromium.org Change-Id: If969b56382a67419aaee742c47c470efebab95af Reviewed-on: https://chromium-review.googlesource.com/c/1264541 Reviewed-by: Rayan Kanso <rayankans@chromium.org> Reviewed-by: Mugdha Lakhani <nator@chromium.org> Commit-Queue: Rayan Kanso <rayankans@chromium.org> Cr-Commit-Position: refs/heads/master@{#597115} -- wpt-commits: 8e9df70029090145da7c2d2e78af4d65dd9caa8b wpt-pr: 13391
testing/web-platform/tests/background-fetch/get.https.window.js
--- a/testing/web-platform/tests/background-fetch/get.https.window.js
+++ b/testing/web-platform/tests/background-fetch/get.https.window.js
@@ -21,16 +21,17 @@ promise_test(async test => {
   const registration = await serviceWorkerRegistration.backgroundFetch.get('x');
   assert_equals(registration, undefined);
 
 }, 'BackgroundFetchManager.get() does not require an activated worker');
 
 backgroundFetchTest(async (test, backgroundFetch) => {
   // The |id| parameter to the BackgroundFetchManager.get() method is required.
   await promise_rejects(test, new TypeError(), backgroundFetch.get());
+  await promise_rejects(test, new TypeError(), backgroundFetch.get(''));
 
   const registration = await backgroundFetch.get('my-id');
   assert_equals(registration, undefined);
 
 }, 'Getting non-existing registrations yields `undefined`');
 
 backgroundFetchTest(async (test, backgroundFetch) => {
   const registrationId = uniqueId();