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

Unified Diff: tests/html/history_test.dart

Issue 11817025: Attempting to remove flakiness from history test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « no previous file | tests/html/html.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/history_test.dart
diff --git a/tests/html/history_test.dart b/tests/html/history_test.dart
index 462acb373a1c55ef1194a5a0e49725c3a5eb8def..bee3323b8866b1d7bc8748e877fb9b5fdea94e7c 100644
--- a/tests/html/history_test.dart
+++ b/tests/html/history_test.dart
@@ -45,12 +45,15 @@ main() {
expect(window.location.href.endsWith('dummy2'), isTrue);
- expectAsync1Once(window.on.popState, (_) {
- expect(window.history.length, length);
- expect(window.location.href.endsWith('dummy1'), isTrue);
- });
+ // Need to wait a frame or two to let the pushState events occur.
+ window.setTimeout(expectAsync0(() {
+ expectAsync1Once(window.on.popState, (_) {
+ expect(window.history.length, length);
+ expect(window.location.href.endsWith('dummy1'), isTrue);
+ });
- window.history.back();
+ window.history.back();
+ }), 100);
}, expectation);
});
« no previous file with comments | « no previous file | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698