Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion lib/web_ui/test/window_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,21 @@ void testMain() {

test('can disable location strategy', () async {
// Disable URL strategy.
expect(() => jsSetUrlStrategy(null), returnsNormally);
void disableUrlStrategy() {
try {
jsSetUrlStrategy(null);
} on AssertionError catch (e) {
if (e.message == 'Cannot set URL strategy more than once.') {
print('=' * 20);
// Print something easy to search for.
print('HISTORY_TEST_FLAKY_ASSERTION_FAILURE');
print('=' * 20);
} else {
rethrow;
}
}
}
expect(disableUrlStrategy, returnsNormally);
// History should be initialized.
expect(window.browserHistory, isNotNull);
// But without a URL strategy.
Expand Down