| OLD | NEW |
| 1 #library('HiddenDom1Test'); | 1 #library('HiddenDom1Test'); |
| 2 #import('../../../testing/unittest/unittest.dart'); | 2 #import('../../../testing/unittest/unittest_html.dart'); |
| 3 #import('dart:html'); | 3 #import('dart:html'); |
| 4 | 4 |
| 5 // Test that the dart:html API does not leak native jsdom methods: | 5 // Test that the dart:html API does not leak native jsdom methods: |
| 6 // onfocus setter. | 6 // onfocus setter. |
| 7 | 7 |
| 8 main() { | 8 main() { |
| 9 forLayoutTests(); | 9 forLayoutTests(); |
| 10 | 10 |
| 11 test('test1', () { | 11 test('test1', () { |
| 12 document.body.elements.add(new Element.html(@''' | 12 document.body.elements.add(new Element.html(@''' |
| (...skipping 22 matching lines...) Expand all Loading... |
| 35 try { | 35 try { |
| 36 action(); | 36 action(); |
| 37 } catch (var e) { | 37 } catch (var e) { |
| 38 ex = e; | 38 ex = e; |
| 39 } | 39 } |
| 40 if (ex === null) | 40 if (ex === null) |
| 41 Expect.fail('Action should have thrown exception'); | 41 Expect.fail('Action should have thrown exception'); |
| 42 | 42 |
| 43 Expect.isTrue(ex is NoSuchMethodException, 'ex is NoSuchMethodException'); | 43 Expect.isTrue(ex is NoSuchMethodException, 'ex is NoSuchMethodException'); |
| 44 } | 44 } |
| OLD | NEW |