| OLD | NEW |
| 1 #library('HistoryTest'); | 1 #library('HistoryTest'); |
| 2 #import('../../../../lib/unittest/unittest.dart'); | 2 #import('../../lib/unittest/unittest.dart'); |
| 3 #import('../../../../lib/unittest/dom_config.dart'); | 3 #import('../../lib/unittest/dom_config.dart'); |
| 4 #import('dart:dom'); | 4 #import('dart:dom'); |
| 5 | 5 |
| 6 main() { | 6 main() { |
| 7 useDomConfiguration(); | 7 useDomConfiguration(); |
| 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.equals(2, window.history.length); | 15 Expect.equals(2, window.history.length); |
| 16 expect(window.location.href.endsWith('foo=baz')).isTrue(); | 16 expect(window.location.href.endsWith('foo=baz')).isTrue(); |
| 17 }); | 17 }); |
| 18 } | 18 } |
| OLD | NEW |