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 496759 bcd7b358b492a08052588e078fb11a8c371c01d1
parent 496758 ad04238da3b66b40bbf8c0609e8d55469652b974
child 496760 ae5884fdd537dd3ebcffbd4a36d33f5284ada8b1
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
bugs1496739, 13391, 1264541, 597115
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 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();