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

Side by Side Diff: LayoutTests/http/tests/geofencing/resources/worker.js

Issue 543203003: Fix the geofencing test to not break if the promises resolve asynchronously. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: cleaner code Created 6 years, 3 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
(Empty)
1 importScripts('../../serviceworker/resources/worker-test-harness.js');
2
3 promise_test(function(test) {
4 return navigator.geofencing.registerRegion(new CircularGeofencingRegion({lat itude: 37.421999, longitude: -122.084015}))
jsbell 2014/09/11 21:13:35 Maybe break this line (and the similarly long line
Marijn Kruisselbrink 2014/09/11 21:54:26 Done. And I changed the indentation a bit as well,
5 .then(test.unreached_func('Promise should not have resolved'))
6 .catch(function() {});
7 }, 'registerRegion should fail');
8
9 promise_test(function(test) {
10 return navigator.geofencing.unregisterRegion("")
11 .then(test.unreached_func('Promise should not have resolved'))
12 .catch(function() {});
13 }, 'unregisterRegion should fail');
14
15 promise_test(function(test) {
16 return navigator.geofencing.getRegisteredRegions()
17 .then(test.unreached_func('Promise should not have resolved'))
18 .catch(function() {});
19 }, 'getRegisteredRegions should fail');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698