Chromium Code Reviews| Index: tests/html/history_test.dart |
| diff --git a/tests/html/history_test.dart b/tests/html/history_test.dart |
| index bee3323b8866b1d7bc8748e877fb9b5fdea94e7c..87a6e83de61b4ae55c0aa8649749813967e6794a 100644 |
| --- a/tests/html/history_test.dart |
| +++ b/tests/html/history_test.dart |
| @@ -3,16 +3,6 @@ import '../../pkg/unittest/lib/unittest.dart'; |
| import '../../pkg/unittest/lib/html_individual_config.dart'; |
| import 'dart:html'; |
| -/// Waits for a callback once, then removes the event handler. |
| -void expectAsync1Once(EventListenerList list, void callback(arg)) { |
| - var fn = null; |
| - fn = expectAsync1((arg) { |
| - list.remove(fn); |
| - callback(arg); |
| - }); |
| - list.add(fn); |
| -} |
| - |
| main() { |
| useHtmlIndividualConfiguration(); |
| @@ -47,7 +37,7 @@ main() { |
| // Need to wait a frame or two to let the pushState events occur. |
| window.setTimeout(expectAsync0(() { |
| - expectAsync1Once(window.on.popState, (_) { |
| + window.onPopState.take(1).listen((_) { |
|
floitsch
2013/01/24 17:17:18
don't you need to wrap this function in an expectA
|
| expect(window.history.length, length); |
| expect(window.location.href.endsWith('dummy1'), isTrue); |
| }); |