Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/geofencing/resources/worker-service-not-available.js

Issue 1926813004: Replace assert_promise_rejects with upstream promise_rejects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update testharness.js and rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 importScripts('../../serviceworker/resources/worker-testharness.js'); 1 importScripts('../../serviceworker/resources/worker-testharness.js');
2 importScripts('../../resources/testharness-helpers.js'); 2 importScripts('../../resources/testharness-helpers.js');
3 3
4 promise_test(function(test) { 4 promise_test(function(test) {
5 return assert_promise_rejects( 5 return promise_rejects(
6 test,
7 'AbortError',
6 navigator.geofencing.registerRegion( 8 navigator.geofencing.registerRegion(
7 new CircularGeofencingRegion({latitude: 37.421999, 9 new CircularGeofencingRegion({latitude: 37.421999,
8 longitude: -122.084015})), 10 longitude: -122.084015})),
9 'AbortError',
10 'registerRegion should fail with an AbortError'); 11 'registerRegion should fail with an AbortError');
11 }, 'registerRegion should fail'); 12 }, 'registerRegion should fail');
12 13
13 promise_test(function(test) { 14 promise_test(function(test) {
14 return assert_promise_rejects( 15 return promise_rejects(
16 test,
17 'AbortError',
15 navigator.geofencing.unregisterRegion(""), 18 navigator.geofencing.unregisterRegion(""),
16 'AbortError',
17 'unregisterRegion should fail with an AbortError'); 19 'unregisterRegion should fail with an AbortError');
18 }, 'unregisterRegion should fail'); 20 }, 'unregisterRegion should fail');
19 21
20 promise_test(function(test) { 22 promise_test(function(test) {
21 return assert_promise_rejects( 23 return promise_rejects(
24 test,
25 'AbortError',
22 navigator.geofencing.getRegisteredRegions(), 26 navigator.geofencing.getRegisteredRegions(),
23 'AbortError',
24 'getRegisteredRegions should fail with an AbortError'); 27 'getRegisteredRegions should fail with an AbortError');
25 }, 'getRegisteredRegions should fail'); 28 }, 'getRegisteredRegions should fail');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698