| OLD | NEW |
| 1 #library('InnerFrameTest'); | 1 #library('InnerFrameTest'); |
| 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_deprecated'); | 4 #import('dart:dom_deprecated'); |
| 5 | 5 |
| 6 main() { | 6 main() { |
| 7 if (window != window.top) { | 7 if (window != window.top) { |
| 8 // Child frame. | 8 // Child frame. |
| 9 | 9 |
| 10 // The child's frame should not be able to access its parent's | 10 // The child's frame should not be able to access its parent's |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 } | 35 } |
| 36 return; | 36 return; |
| 37 } | 37 } |
| 38 | 38 |
| 39 // Parent / test frame | 39 // Parent / test frame |
| 40 useDomConfiguration(); | 40 useDomConfiguration(); |
| 41 | 41 |
| 42 final iframe = document.createElement('iframe'); | 42 final iframe = document.createElement('iframe'); |
| 43 iframe.src = window.location.href; | 43 iframe.src = window.location.href; |
| 44 | 44 |
| 45 asyncTest('prepare', 1, () { | 45 test('prepare', () { |
| 46 iframe.addEventListener('load', (e) => callbackDone(), false); | 46 iframe.addEventListener('load', expectAsync1((e) {}), false); |
| 47 document.body.appendChild(iframe); | 47 document.body.appendChild(iframe); |
| 48 }); | 48 }); |
| 49 | 49 |
| 50 test('frameElement', () { | 50 test('frameElement', () { |
| 51 var div = document.getElementById('illegalFrameElement'); | 51 var div = document.getElementById('illegalFrameElement'); |
| 52 | 52 |
| 53 // Ensure that this parent frame was not modified by its child. | 53 // Ensure that this parent frame was not modified by its child. |
| 54 Expect.isNull(div); | 54 Expect.isNull(div); |
| 55 }); | 55 }); |
| 56 | 56 |
| 57 test('top', () { | 57 test('top', () { |
| 58 var div = document.getElementById('illegalTop'); | 58 var div = document.getElementById('illegalTop'); |
| 59 | 59 |
| 60 // Ensure that this parent frame was not modified by its child. | 60 // Ensure that this parent frame was not modified by its child. |
| 61 Expect.isNull(div); | 61 Expect.isNull(div); |
| 62 }); | 62 }); |
| 63 } | 63 } |
| OLD | NEW |