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

Unified Diff: dom/GeolocationTest.dart

Issue 12221052: Remove use of deprecated test methods (asynctTest/callbackDone/expectThrows). Base URL: http://src.chromium.org/multivm/trunk/webkit/LayoutTests/dart/
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Multiscript.html ('k') | dom/Workers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
});
}
« no previous file with comments | « Multiscript.html ('k') | dom/Workers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698