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

Side by Side Diff: pkg/dev_compiler/test/codegen/lib/html/documentfragment_test.dart

Issue 2416853003: Move minitest.dart into the expect package. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
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 import 'dart:html'; 5 import 'dart:html';
6 6
7 import 'package:minitest/minitest.dart'; 7 import 'package:expect/minitest.dart';
8 8
9 import 'util.dart'; 9 import 'util.dart';
10 10
11 main() { 11 main() {
12 var isAnchorElement = 12 var isAnchorElement =
13 predicate((x) => x is AnchorElement, 'is an AnchorElement'); 13 predicate((x) => x is AnchorElement, 'is an AnchorElement');
14 14
15 List<String> _nodeStrings(Iterable<Node> input) { 15 List<String> _nodeStrings(Iterable<Node> input) {
16 var out = new List<String>(); 16 var out = new List<String>();
17 for (Node n in input) { 17 for (Node n in input) {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 expect(fragment.innerHtml, "foo<a>bar</a>"); 169 expect(fragment.innerHtml, "foo<a>bar</a>");
170 }); 170 });
171 171
172 test('query searches the fragment', () { 172 test('query searches the fragment', () {
173 var fragment = new DocumentFragment.html( 173 var fragment = new DocumentFragment.html(
174 "<div class='foo'><a>foo</a><b>bar</b></div>"); 174 "<div class='foo'><a>foo</a><b>bar</b></div>");
175 expect(fragment.query(".foo a").tagName, "A"); 175 expect(fragment.query(".foo a").tagName, "A");
176 expect(_nodeStrings(fragment.queryAll(".foo *")), equals(["A", "B"])); 176 expect(_nodeStrings(fragment.queryAll(".foo *")), equals(["A", "B"]));
177 }); 177 });
178 } 178 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698