c265902bea
Review URL: https://chromiumcodereview.appspot.com//10836241 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10685 260f80e4-7a28-3924-810f-c04153c831b5
26 lines
714 B
Dart
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);
|
|
});
|
|
}
|