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

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

Issue 11238035: Make isEmpty a getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 1 month 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/localstorage_test.dart ('k') | tests/html/query_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 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library('NodeTest'); 5 #library('NodeTest');
6 #import('../../pkg/unittest/unittest.dart'); 6 #import('../../pkg/unittest/unittest.dart');
7 #import('../../pkg/unittest/html_config.dart'); 7 #import('../../pkg/unittest/html_config.dart');
8 #import('dart:html'); 8 #import('dart:html');
9 9
10 Node makeNode() => new Element.tag('div'); 10 Node makeNode() => new Element.tag('div');
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 Expect.isFalse(node.nodes.every((n) => n is Comment)); 81 Expect.isFalse(node.nodes.every((n) => n is Comment));
82 }); 82 });
83 83
84 test('some', () { 84 test('some', () {
85 var node = makeNodeWithChildren(); 85 var node = makeNodeWithChildren();
86 Expect.isTrue(node.nodes.some((n) => n is Comment)); 86 Expect.isTrue(node.nodes.some((n) => n is Comment));
87 Expect.isFalse(node.nodes.some((n) => n is SVGElement)); 87 Expect.isFalse(node.nodes.some((n) => n is SVGElement));
88 }); 88 });
89 89
90 test('isEmpty', () { 90 test('isEmpty', () {
91 Expect.isTrue(makeNode().nodes.isEmpty()); 91 Expect.isTrue(makeNode().nodes.isEmpty);
92 Expect.isFalse(makeNodeWithChildren().nodes.isEmpty()); 92 Expect.isFalse(makeNodeWithChildren().nodes.isEmpty);
93 }); 93 });
94 94
95 test('length', () { 95 test('length', () {
96 Expect.equals(0, makeNode().nodes.length); 96 Expect.equals(0, makeNode().nodes.length);
97 Expect.equals(3, makeNodeWithChildren().nodes.length); 97 Expect.equals(3, makeNodeWithChildren().nodes.length);
98 }); 98 });
99 99
100 test('[]', () { 100 test('[]', () {
101 var node = makeNodeWithChildren(); 101 var node = makeNodeWithChildren();
102 Expect.isTrue(node.nodes[0] is Text); 102 Expect.isTrue(node.nodes[0] is Text);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 }); 187 });
188 188
189 test('getRange', () { 189 test('getRange', () {
190 var range = makeNodeList().getRange(1, 2); 190 var range = makeNodeList().getRange(1, 2);
191 Expect.isTrue(range is List<Node>); 191 Expect.isTrue(range is List<Node>);
192 Expect.isTrue(range[0] is BRElement); 192 Expect.isTrue(range[0] is BRElement);
193 Expect.isTrue(range[1] is Comment); 193 Expect.isTrue(range[1] is Comment);
194 }); 194 });
195 }); 195 });
196 } 196 }
OLDNEW
« no previous file with comments | « tests/html/localstorage_test.dart ('k') | tests/html/query_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698