Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: tests/html/inner_frame_test.dart

Issue 10412015: aChange all asyncTest/callbackDone style tests to use the new expectAsync/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #library('InnerFrameTest'); 1 #library('InnerFrameTest');
2 #import('../../lib/unittest/unittest.dart'); 2 #import('../../lib/unittest/unittest.dart');
3 #import('../../lib/unittest/html_config.dart'); 3 #import('../../lib/unittest/html_config.dart');
4 #import('dart:html'); 4 #import('dart:html');
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
35 } 35 }
36 return; 36 return;
37 } 37 }
38 38
39 // Parent / test frame 39 // Parent / test frame
40 useHtmlConfiguration(); 40 useHtmlConfiguration();
41 41
42 final iframe = new Element.tag('iframe'); 42 final iframe = new Element.tag('iframe');
43 iframe.src = window.location.href; 43 iframe.src = window.location.href;
44 44
45 asyncTest('prepare', 1, () { 45 test('prepare', () {
46 iframe.on.load.add((e) => callbackDone()); 46 iframe.on.load.add(expectAsync1((e) {}));
47 document.body.nodes.add(iframe); 47 document.body.nodes.add(iframe);
48 }); 48 });
49 49
50 test('frameElement', () { 50 test('frameElement', () {
51 var div = document.query('#illegalFrameElement'); 51 var div = document.query('#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.query('#illegalTop'); 58 var div = document.query('#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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698