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

Side by Side Diff: test/codegen/lib/html/async_test.dart

Issue 1930043002: Add all dart:html tests from the sdk to test/codegen. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: 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
(Empty)
1 library async_test;
2
3 import 'package:unittest/unittest.dart';
4 import 'package:unittest/html_config.dart';
5
6 import 'dart:async';
7 import 'dart:isolate';
8 import 'dart:html';
9
10 import 'async_oneshot.dart' as oneshot_test show main;
11 import 'async_periodictimer.dart' as periodictimer_test show main;
12 import 'async_cancellingisolate.dart' as cancelling_test show main;
13
14 oneshot(message) => oneshot_test.main(message.first, message.last);
15 periodicTimerIsolate(message) =>
16 periodictimer_test.main(message.first, message.last);
17 cancellingIsolate(message) => cancelling_test.main(message.first, message.last);
18
19 main() {
20 useHtmlConfiguration();
21
22 test('one shot timer in pure isolate', () {
23 var response = new ReceivePort();
24 var remote = Isolate.spawn(oneshot,
25 [['START'], response.sendPort]);
26 expect(remote.then((_) => response.first), completion('DONE'));
27 });
28
29 test('periodic timer in pure isolate', () {
30 var response = new ReceivePort();
31 var remote = Isolate.spawn(periodicTimerIsolate,
32 [['START'], response.sendPort]);
33 expect(remote.then((_) => response.first), completion('DONE'));
34 });
35
36 test('cancellation in pure isolate', () {
37 var response = new ReceivePort();
38 var remote = Isolate.spawn(cancellingIsolate,
39 [['START'], response.sendPort]);
40 expect(remote.then((_) => response.first), completion('DONE'));
41 });
42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698