| OLD | NEW |
| 1 #library('HistoryTest'); | 1 #library('HistoryTest'); |
| 2 #import('../../pkg/unittest/unittest.dart'); | 2 #import('../../pkg/unittest/lib/unittest.dart'); |
| 3 #import('../../pkg/unittest/html_config.dart'); | 3 #import('../../pkg/unittest/lib/html_config.dart'); |
| 4 #import('dart:html'); | 4 #import('dart:html'); |
| 5 | 5 |
| 6 main() { | 6 main() { |
| 7 useHtmlConfiguration(); | 7 useHtmlConfiguration(); |
| 8 test('History', () { | 8 test('History', () { |
| 9 window.history.pushState(null, document.title, '?foo=bar'); | 9 window.history.pushState(null, document.title, '?foo=bar'); |
| 10 expect(window.history.length, equals(2)); | 10 expect(window.history.length, equals(2)); |
| 11 window.history.back(); | 11 window.history.back(); |
| 12 expect(window.location.href.endsWith('foo=bar'), isTrue); | 12 expect(window.location.href.endsWith('foo=bar'), isTrue); |
| 13 | 13 |
| 14 window.history.replaceState(null, document.title, '?foo=baz'); | 14 window.history.replaceState(null, document.title, '?foo=baz'); |
| 15 expect(window.history.length, equals(2)); | 15 expect(window.history.length, equals(2)); |
| 16 expect(window.location.href.endsWith('foo=baz'), isTrue); | 16 expect(window.location.href.endsWith('foo=baz'), isTrue); |
| 17 }); | 17 }); |
| 18 } | 18 } |
| OLD | NEW |