Files
sdk/tests/html/cross_frame_test.dart
T
2012-08-14 22:36:59 +00:00

26 lines
714 B
Dart

#library('CrossFrameTest');
#import('../../pkg/unittest/unittest.dart');
#import('../../pkg/unittest/html_config.dart');
#import('dart:html');
main() {
useHtmlConfiguration();
test('contentWindow', () {
final iframe = new Element.tag('iframe');
document.body.nodes.add(iframe);
final frameWindow = iframe.contentWindow;
// Ensure that the frame's document is inaccessible via window.
expect(() => frameWindow.document, throws);
});
test('contentDocument', () {
final iframe = new Element.tag('iframe');
document.body.nodes.add(iframe);
// Ensure that the frame's document is inaccessible.
expect(() => iframe.contentDocument, throws);
});
}