Files
sdk/tests/lib_2/html/interactive_geolocation_test.dart
T
Terry Lucas 16b6ba6a04 Splitout another set of group tests.
TBR=rnystrom@google.com

Change-Id: I6d9aea59eac88de07b76b9597cf6ceac32350b55
Reviewed-on: https://dart-review.googlesource.com/12305
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
2017-10-09 01:07:37 +00:00

35 lines
1.0 KiB
Dart

// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library interactive_test;
import 'dart:async';
import 'dart:html';
import 'package:unittest/unittest.dart';
import 'package:unittest/html_individual_config.dart';
import 'utils.dart';
main() {
useHtmlIndividualConfiguration();
test('getCurrentPosition', () {
return window.navigator.geolocation.getCurrentPosition().then((position) {
expect(position.coords.latitude, isNotNull);
expect(position.coords.longitude, isNotNull);
expect(position.coords.accuracy, isNotNull);
});
});
test('watchPosition', () {
return window.navigator.geolocation
.watchPosition()
.first
.then((position) {
expect(position.coords.latitude, isNotNull);
expect(position.coords.longitude, isNotNull);
expect(position.coords.accuracy, isNotNull);
});
});
}