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

Unified Diff: tests/html/cross_frame_test.dart

Issue 11642035: Renaming Window to WindowBase and LocalWindow to Window. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: tests/html/cross_frame_test.dart
diff --git a/tests/html/cross_frame_test.dart b/tests/html/cross_frame_test.dart
index b5d91446b0536c1d80a014c08a4ec2746fdd3866..dd5b4bef1b316990a343683ede8536bfb70ec118 100644
--- a/tests/html/cross_frame_test.dart
+++ b/tests/html/cross_frame_test.dart
@@ -6,31 +6,31 @@ import 'dart:html';
main() {
useHtmlConfiguration();
+ var isWindowBase = predicate((x) => x is WindowBase, 'is a WindowBase');
var isWindow = predicate((x) => x is Window, 'is a Window');
- var isLocalWindow = predicate((x) => x is LocalWindow, 'is a LocalWindow');
- var isLocation = predicate((x) => x is Location, 'is a Location');
- var isLocalLocation =
- predicate((x) => x is LocalLocation, 'is a LocalLocation');
+ var isLocationBase = predicate((x) => x is LocationBase, 'is a LocationBase');
+ var isLocation =
+ predicate((x) => x is Location, 'is a Location');
+ var isHistoryBase = predicate((x) => x is HistoryBase, 'is a HistoryBase');
var isHistory = predicate((x) => x is History, 'is a History');
- var isLocalHistory = predicate((x) => x is LocalHistory, 'is a LocalHistory');
final iframe = new Element.tag('iframe');
document.body.nodes.add(iframe);
test('window', () {
- expect(window, isLocalWindow);
+ expect(window, isWindow);
expect(window.document, document);
});
test('iframe', () {
final frameWindow = iframe.contentWindow;
- expect(frameWindow, isWindow);
+ expect(frameWindow, isWindowBase);
//TODO(gram) The next test should be written as:
- // expect(frameWindow, isNot(isLocalWindow));
+ // expect(frameWindow, isNot(isWindow));
// but that will cause problems now until is/is! work
// properly in dart2js instead of always returning true.
- expect(frameWindow is! LocalWindow, isTrue);
- expect(frameWindow.parent, isLocalWindow);
+ expect(frameWindow is! Window, isTrue);
+ expect(frameWindow.parent, isWindow);
// Ensure that the frame's document is inaccessible via window.
expect(() => frameWindow.document, throws);
@@ -42,27 +42,27 @@ main() {
});
test('location', () {
- expect(window.location, isLocalLocation);
+ expect(window.location, isLocation);
final frameLocation = iframe.contentWindow.location;
- expect(frameLocation, isLocation);
+ expect(frameLocation, isLocationBase);
// TODO(gram) Similar to the above, the next test should be:
- // expect(frameLocation, isNot(isLocalLocation));
- expect(frameLocation is! LocalLocation, isTrue);
+ // expect(frameLocation, isNot(isLocation));
+ expect(frameLocation is! Location, isTrue);
expect(() => frameLocation.href, throws);
expect(() => frameLocation.hash, throws);
final frameParentLocation = iframe.contentWindow.parent.location;
- expect(frameParentLocation, isLocalLocation);
+ expect(frameParentLocation, isLocation);
});
test('history', () {
- expect(window.history, isLocalHistory);
+ expect(window.history, isHistory);
final frameHistory = iframe.contentWindow.history;
- expect(frameHistory, isHistory);
+ expect(frameHistory, isHistoryBase);
// See earlier comments.
- //expect(frameHistory, isNot(isLocalHistory));
- expect(frameHistory is! LocalHistory, isTrue);
+ //expect(frameHistory, isNot(isHistory));
+ expect(frameHistory is! History, isTrue);
// Valid methods.
frameHistory.forward();
@@ -70,6 +70,6 @@ main() {
expect(() => frameHistory.length, throws);
final frameParentHistory = iframe.contentWindow.parent.history;
- expect(frameParentHistory, isLocalHistory);
+ expect(frameParentHistory, isHistory);
});
}

Powered by Google App Engine
This is Rietveld 408576698