OLD | NEW |
1 #library('HiddenDom2Test'); | 1 #library('HiddenDom2Test'); |
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 // appendChild operation. | 6 // appendChild operation. |
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 25 matching lines...) Expand all Loading... |
38 action(); | 38 action(); |
39 } catch (var e) { | 39 } catch (var e) { |
40 threw = true; | 40 threw = true; |
41 ex = e; | 41 ex = e; |
42 } | 42 } |
43 if (!threw) | 43 if (!threw) |
44 Expect.fail('Action should have thrown exception'); | 44 Expect.fail('Action should have thrown exception'); |
45 | 45 |
46 Expect.isTrue(ex is NoSuchMethodException, 'ex is NoSuchMethodException'); | 46 Expect.isTrue(ex is NoSuchMethodException, 'ex is NoSuchMethodException'); |
47 } | 47 } |
OLD | NEW |