| Index: dom/GeolocationTest.dart
|
| ===================================================================
|
| --- dom/GeolocationTest.dart (revision 1080)
|
| +++ dom/GeolocationTest.dart (working copy)
|
| @@ -8,29 +8,27 @@
|
|
|
| errorCallback(error) => Expect.fail('${error.code}: ${error.message}');
|
|
|
| - asyncTest('geolocation.getCurrentPosition', 1, () {
|
| + test('geolocation.getCurrentPosition', () {
|
| final geolocation = window.navigator.geolocation;
|
|
|
| - geolocation.getCurrentPosition((posA) {
|
| - window.setTimeout(() {
|
| - geolocation.getCurrentPosition((posB) {
|
| + geolocation.getCurrentPosition(expectAsync1((posA) {
|
| + window.setTimeout(expectAsync0(() {
|
| + geolocation.getCurrentPosition(expectAsync1((posB) {
|
| Expect.equals(posA.coords.longitude, posB.coords.longitude);
|
| - callbackDone();
|
| - }, errorCallback);
|
| - }, 0);
|
| - }, errorCallback);
|
| + }), errorCallback);
|
| + }), 0);
|
| + }), errorCallback);
|
| });
|
|
|
| - asyncTest('geolocation.watchPosition', 1, () {
|
| + test('geolocation.watchPosition', () {
|
| final geolocation = window.navigator.geolocation;
|
|
|
| - geolocation.getCurrentPosition((posA) {
|
| - window.setTimeout(() {
|
| - geolocation.watchPosition((posB) {
|
| + geolocation.getCurrentPosition(expectAsync1((posA) {
|
| + window.setTimeout(expectAsync0(() {
|
| + geolocation.watchPosition(expectAsync1((posB) {
|
| Expect.equals(posA.coords.longitude, posB.coords.longitude);
|
| - callbackDone();
|
| - }, errorCallback);
|
| - }, 0);
|
| - }, errorCallback);
|
| + }), errorCallback);
|
| + }), 0);
|
| + }), errorCallback);
|
| });
|
| }
|
|
|