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

Unified Diff: tests/html/element_test.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
« no previous file with comments | « tests/html/element_classes_test.dart ('k') | tests/html/htmlcollection_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/element_test.dart
diff --git a/tests/html/element_test.dart b/tests/html/element_test.dart
index 63b586733ea54fb9a502fa5d6c716e9d9b4d95d0..d9916ba24ca0335e1ca9167a78eb13078df62737 100644
--- a/tests/html/element_test.dart
+++ b/tests/html/element_test.dart
@@ -368,9 +368,9 @@ main() {
expect(els[2], isInputElement);
});
- test('filter', () {
+ test('where', () {
var filtered = makeElementWithChildren().children.
- filter((n) => n is ImageElement);
+ where((n) => n is ImageElement);
expect(1, filtered.length);
expect(filtered[0], isImageElement);
expect(filtered, isElementList);
@@ -382,10 +382,10 @@ main() {
expect(el.children.every((n) => n is InputElement), isFalse);
});
- test('some', () {
+ test('any', () {
var el = makeElementWithChildren();
- expect(el.children.some((n) => n is InputElement), isTrue);
- expect(el.children.some((n) => n is svg.SvgElement), isFalse);
+ expect(el.children.any((n) => n is InputElement), isTrue);
+ expect(el.children.any((n) => n is svg.SvgElement), isFalse);
});
test('isEmpty', () {
@@ -506,13 +506,13 @@ main() {
expect(els[2], isHRElement);
});
- test('map', () {
- var texts = getQueryAll().map((el) => el.text);
+ test('mappedBy', () {
+ var texts = getQueryAll().mappedBy((el) => el.text).toList();
expect(texts, equals(['Dart!', 'Hello', '']));
});
- test('filter', () {
- var filtered = getQueryAll().filter((n) => n is SpanElement);
+ test('where', () {
+ var filtered = getQueryAll().where((n) => n is SpanElement).toList();
expect(filtered.length, 1);
expect(filtered[0], isSpanElement);
expect(filtered, isElementList);
@@ -524,10 +524,10 @@ main() {
expect(el.every((n) => n is SpanElement), isFalse);
});
- test('some', () {
+ test('any', () {
var el = getQueryAll();
- expect(el.some((n) => n is SpanElement), isTrue);
- expect(el.some((n) => n is svg.SvgElement), isFalse);
+ expect(el.any((n) => n is SpanElement), isTrue);
+ expect(el.any((n) => n is svg.SvgElement), isFalse);
});
test('isEmpty', () {
@@ -590,8 +590,8 @@ main() {
group('_ElementList', () {
List<Element> makeElList() => makeElementWithChildren().children;
- test('filter', () {
- var filtered = makeElList().filter((n) => n is ImageElement);
+ test('where', () {
+ var filtered = makeElList().where((n) => n is ImageElement);
expect(filtered.length, 1);
expect(filtered[0], isImageElement);
expect(filtered, isElementList);
« no previous file with comments | « tests/html/element_classes_test.dart ('k') | tests/html/htmlcollection_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698