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

Unified Diff: tests/lib_strong/html/cross_frame_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: tests/lib_strong/html/cross_frame_test.dart
diff --git a/tests/lib_strong/html/cross_frame_test.dart b/tests/lib_strong/html/cross_frame_test.dart
index bdb0d888d83780fa84fd2579f2b9f946a629dc71..55b9e39dacf5b6916d9e106538c5340c73a107b2 100644
--- a/tests/lib_strong/html/cross_frame_test.dart
+++ b/tests/lib_strong/html/cross_frame_test.dart
@@ -6,8 +6,7 @@ main() {
var isWindowBase = predicate((x) => x is WindowBase, 'is a WindowBase');
var isWindow = predicate((x) => x is Window, 'is a Window');
var isLocationBase = predicate((x) => x is LocationBase, 'is a LocationBase');
- var isLocation =
- predicate((x) => x is Location, 'is a Location');
+ 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');
@@ -15,58 +14,58 @@ main() {
document.body.append(iframe);
test('window', () {
- expect(window, isWindow);
- expect(window.document, document);
- });
+ expect(window, isWindow);
+ expect(window.document, document);
+ });
test('iframe', () {
- final frameWindow = iframe.contentWindow;
- expect(frameWindow, isWindowBase);
- //TODO(gram) The next test should be written as:
- // 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! Window, isTrue);
- expect(frameWindow.parent, isWindow);
+ final frameWindow = iframe.contentWindow;
+ expect(frameWindow, isWindowBase);
+ //TODO(gram) The next test should be written as:
+ // 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! Window, isTrue);
+ expect(frameWindow.parent, isWindow);
- // Ensure that the frame's document is inaccessible via window.
- expect(() => frameWindow.document, throws);
- });
+ // Ensure that the frame's document is inaccessible via window.
+ expect(() => frameWindow.document, throws);
+ });
test('contentDocument', () {
- // Ensure that the frame's document is inaccessible.
- expect(() => iframe.contentDocument, throws);
- });
+ // Ensure that the frame's document is inaccessible.
+ expect(() => iframe.contentDocument, throws);
+ });
test('location', () {
- expect(window.location, isLocation);
- final frameLocation = iframe.contentWindow.location;
- expect(frameLocation, isLocationBase);
- // TODO(gram) Similar to the above, the next test should be:
- // expect(frameLocation, isNot(isLocation));
- expect(frameLocation is! Location, isTrue);
+ expect(window.location, isLocation);
+ final frameLocation = iframe.contentWindow.location;
+ expect(frameLocation, isLocationBase);
+ // TODO(gram) Similar to the above, the next test should be:
+ // expect(frameLocation, isNot(isLocation));
+ expect(frameLocation is! Location, isTrue);
- expect(() => frameLocation.href, throws);
- expect(() => frameLocation.hash, throws);
+ expect(() => frameLocation.href, throws);
+ expect(() => frameLocation.hash, throws);
- final frameParentLocation = iframe.contentWindow.parent.location;
- expect(frameParentLocation, isLocation);
- });
+ final frameParentLocation = iframe.contentWindow.parent.location;
+ expect(frameParentLocation, isLocation);
+ });
test('history', () {
- expect(window.history, isHistory);
- final frameHistory = iframe.contentWindow.history;
- expect(frameHistory, isHistoryBase);
- // See earlier comments.
- //expect(frameHistory, isNot(isHistory));
- expect(frameHistory is! History, isTrue);
+ expect(window.history, isHistory);
+ final frameHistory = iframe.contentWindow.history;
+ expect(frameHistory, isHistoryBase);
+ // See earlier comments.
+ //expect(frameHistory, isNot(isHistory));
+ expect(frameHistory is! History, isTrue);
- // Valid methods.
- frameHistory.forward();
+ // Valid methods.
+ frameHistory.forward();
- expect(() => frameHistory.length, throws);
+ expect(() => frameHistory.length, throws);
- final frameParentHistory = iframe.contentWindow.parent.history;
- expect(frameParentHistory, isHistory);
- });
+ final frameParentHistory = iframe.contentWindow.parent.history;
+ expect(frameParentHistory, isHistory);
+ });
}

Powered by Google App Engine
This is Rietveld 408576698