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

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

Issue 2413073002: Start cleaning up the HTML tests. (Closed)
Patch Set: Unfork expect.dart. 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 ElementAddTest;
6 import 'package:unittest/unittest.dart';
7 import 'package:unittest/html_config.dart';
8 import 'util.dart';
9 import 'dart:html'; 5 import 'dart:html';
10 6
7 import 'package:minitest/minitest.dart';
8
9 import 'util.dart';
10
11 main() { 11 main() {
12 useHtmlConfiguration();
13
14 var isSpanElement = predicate((x) => x is SpanElement, 'is a SpanElemt'); 12 var isSpanElement = predicate((x) => x is SpanElement, 'is a SpanElemt');
15 var isDivElement = predicate((x) => x is DivElement, 'is a DivElement'); 13 var isDivElement = predicate((x) => x is DivElement, 'is a DivElement');
16 var isText = predicate((x) => x is Text, 'is a Text'); 14 var isText = predicate((x) => x is Text, 'is a Text');
17 15
18 void expectNoSuchMethod(void fn()) => 16 void expectNoSuchMethod(void fn()) =>
19 expect(fn, throwsNoSuchMethodError); 17 expect(fn, throwsNoSuchMethodError);
20 18
21 group('append', () { 19 group('append', () {
22 test('htmlelement', () { 20 test('htmlelement', () {
23 var el = new DivElement(); 21 var el = new DivElement();
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 var child = new DivElement(); 259 var child = new DivElement();
262 parent.children.add(child); 260 parent.children.add(child);
263 261
264 parent.insertAdjacentText('beforeend', 'test'); 262 parent.insertAdjacentText('beforeend', 'test');
265 263
266 expect(parent.nodes.length, 2); 264 expect(parent.nodes.length, 2);
267 expect(parent.nodes[1], isText); 265 expect(parent.nodes[1], isText);
268 }); 266 });
269 }); 267 });
270 } 268 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698