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

Unified Diff: tests/lib_strong/html/element_classes_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/element_classes_test.dart
diff --git a/tests/lib_strong/html/element_classes_test.dart b/tests/lib_strong/html/element_classes_test.dart
index 0139471ca18ba9ccff07404031c8ddd50cba9bf9..1688422bfccd161b77da4c7fe069788ba0bdc40f 100644
--- a/tests/lib_strong/html/element_classes_test.dart
+++ b/tests/lib_strong/html/element_classes_test.dart
@@ -14,13 +14,12 @@ Element makeElementWithClasses() =>
CssClassSet makeClassSet() => makeElementWithClasses().classes;
-Element makeListElement() =>
- new Element.html('<ul class="foo bar baz">'
- '<li class="quux qux">'
- '<li class="meta">'
- '<li class="classy lassy">'
- '<li class="qux lassy">'
- '</ul>');
+Element makeListElement() => new Element.html('<ul class="foo bar baz">'
+ '<li class="quux qux">'
+ '<li class="meta">'
+ '<li class="classy lassy">'
+ '<li class="qux lassy">'
+ '</ul>');
Element listElement;
@@ -71,8 +70,7 @@ main() {
});
test('toString', () {
- expect(makeClassSet().toString().split(' '),
- equals(['foo', 'bar', 'baz']));
+ expect(makeClassSet().toString().split(' '), equals(['foo', 'bar', 'baz']));
expect(makeElement().classes.toString(), '');
});
@@ -216,7 +214,7 @@ main() {
classes.toggleAll(['bar', 'foo'], true);
expect(classes, equals(['baz', 'qux', 'quux', 'bar', 'foo']));
classes.toggleAll(['baz', 'quux'], false);
- expect(classes, equals(['qux','bar', 'foo']));
+ expect(classes, equals(['qux', 'bar', 'foo']));
});
test('retainAll', () {
@@ -273,12 +271,12 @@ main() {
// Test that the 'view' helper function is behaving.
var elements = listElementSetup();
expect(view(elements.classes), '[classy, lassy, meta, quux, qux]');
- expect(view(elements),
- '[[quux, qux], [meta], [classy, lassy], [lassy, qux]]');
+ expect(
+ view(elements), '[[quux, qux], [meta], [classy, lassy], [lassy, qux]]');
});
test('listClasses=', () {
- var elements = listElementSetup();
+ var elements = listElementSetup();
elements.classes = ['foo', 'qux'];
elements = document.queryAll('li');
for (Element e in elements) {
@@ -303,14 +301,14 @@ main() {
expect(elements.classes.contains('foo'), isFalse);
});
-
test('listAdd', () {
- var elements = listElementSetup();
+ var elements = listElementSetup();
var added = elements.classes.add('lassie');
expect(added, isNull);
expect(view(elements.classes), '[classy, lassie, lassy, meta, quux, qux]');
- expect(view(elements),
+ expect(
+ view(elements),
'[[lassie, quux, qux], [lassie, meta], [classy, lassie, lassy], '
'[lassie, lassy, qux]]');
});
@@ -319,8 +317,8 @@ main() {
var elements = listElementSetup();
expect(elements.classes.remove('lassi'), isFalse);
expect(view(elements.classes), '[classy, lassy, meta, quux, qux]');
- expect(view(elements),
- '[[quux, qux], [meta], [classy, lassy], [lassy, qux]]');
+ expect(
+ view(elements), '[[quux, qux], [meta], [classy, lassy], [lassy, qux]]');
expect(elements.classes.remove('qux'), isTrue);
expect(view(elements.classes), '[classy, lassy, meta, quux]');
@@ -331,8 +329,8 @@ main() {
var elements = listElementSetup();
elements.classes.toggle('qux');
expect(view(elements.classes), '[classy, lassy, meta, quux, qux]');
- expect(view(elements),
- '[[quux], [meta, qux], [classy, lassy, qux], [lassy]]');
+ expect(
+ view(elements), '[[quux], [meta, qux], [classy, lassy, qux], [lassy]]');
});
test('listAddAll', () {
@@ -340,7 +338,8 @@ main() {
elements.classes.addAll(['qux', 'lassi', 'sassy']);
expect(view(elements.classes),
'[classy, lassi, lassy, meta, quux, qux, sassy]');
- expect(view(elements),
+ expect(
+ view(elements),
'[[lassi, quux, qux, sassy], [lassi, meta, qux, sassy], '
'[classy, lassi, lassy, qux, sassy], [lassi, lassy, qux, sassy]]');
});
@@ -350,17 +349,16 @@ main() {
elements.classes.removeAll(['qux', 'lassy', 'meta']);
expect(view(elements.classes), '[classy, quux]');
expect(view(elements), '[[quux], [], [classy], []]');
-
});
test('listToggleAll', () {
var elements = listElementSetup();
elements.classes.toggleAll(['qux', 'meta', 'mornin']);
expect(view(elements.classes), '[classy, lassy, meta, mornin, quux, qux]');
- expect(view(elements),
+ expect(
+ view(elements),
'[[meta, mornin, quux], [mornin, qux], '
'[classy, lassy, meta, mornin, qux], [lassy, meta, mornin]]');
-
});
test('listRetainAll', () {
@@ -374,8 +372,7 @@ main() {
var elements = listElementSetup();
elements.classes.removeWhere((s) => s.startsWith('q'));
expect(view(elements.classes), '[classy, lassy, meta]');
- expect(view(elements),
- '[[], [meta], [classy, lassy], [lassy]]');
+ expect(view(elements), '[[], [meta], [classy, lassy], [lassy]]');
});
test('listRetainWhere', () {

Powered by Google App Engine
This is Rietveld 408576698