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

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

Issue 14883008: use .append instead of .nodes.add (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: revert node_test and element_test Created 7 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
« no previous file with comments | « tests/html/client_rect_test.dart ('k') | tests/html/css_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library CrossFrameTest; 1 library CrossFrameTest;
2 import '../../pkg/unittest/lib/unittest.dart'; 2 import '../../pkg/unittest/lib/unittest.dart';
3 import '../../pkg/unittest/lib/html_config.dart'; 3 import '../../pkg/unittest/lib/html_config.dart';
4 import 'dart:html'; 4 import 'dart:html';
5 5
6 main() { 6 main() {
7 useHtmlConfiguration(); 7 useHtmlConfiguration();
8 8
9 var isWindowBase = predicate((x) => x is WindowBase, 'is a WindowBase'); 9 var isWindowBase = predicate((x) => x is WindowBase, 'is a WindowBase');
10 var isWindow = predicate((x) => x is Window, 'is a Window'); 10 var isWindow = predicate((x) => x is Window, 'is a Window');
11 var isLocationBase = predicate((x) => x is LocationBase, 'is a LocationBase'); 11 var isLocationBase = predicate((x) => x is LocationBase, 'is a LocationBase');
12 var isLocation = 12 var isLocation =
13 predicate((x) => x is Location, 'is a Location'); 13 predicate((x) => x is Location, 'is a Location');
14 var isHistoryBase = predicate((x) => x is HistoryBase, 'is a HistoryBase'); 14 var isHistoryBase = predicate((x) => x is HistoryBase, 'is a HistoryBase');
15 var isHistory = predicate((x) => x is History, 'is a History'); 15 var isHistory = predicate((x) => x is History, 'is a History');
16 16
17 final iframe = new Element.tag('iframe'); 17 final iframe = new Element.tag('iframe');
18 document.body.nodes.add(iframe); 18 document.body.append(iframe);
19 19
20 test('window', () { 20 test('window', () {
21 expect(window, isWindow); 21 expect(window, isWindow);
22 expect(window.document, document); 22 expect(window.document, document);
23 }); 23 });
24 24
25 test('iframe', () { 25 test('iframe', () {
26 final frameWindow = iframe.contentWindow; 26 final frameWindow = iframe.contentWindow;
27 expect(frameWindow, isWindowBase); 27 expect(frameWindow, isWindowBase);
28 //TODO(gram) The next test should be written as: 28 //TODO(gram) The next test should be written as:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 // Valid methods. 67 // Valid methods.
68 frameHistory.forward(); 68 frameHistory.forward();
69 69
70 expect(() => frameHistory.length, throws); 70 expect(() => frameHistory.length, throws);
71 71
72 final frameParentHistory = iframe.contentWindow.parent.history; 72 final frameParentHistory = iframe.contentWindow.parent.history;
73 expect(frameParentHistory, isHistory); 73 expect(frameParentHistory, isHistory);
74 }); 74 });
75 } 75 }
OLDNEW
« no previous file with comments | « tests/html/client_rect_test.dart ('k') | tests/html/css_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698