OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 'utils.dart'; | 9 import 'utils.dart'; |
10 | 10 |
11 main() { | 11 main() { |
12 test('create via custom tag', () { | 12 test('create via custom tag', () { |
13 var element = new Element.tag('x-basic1')..id = 'basic1'; | 13 var element = new Element.tag('x-basic1')..id = 'basic1'; |
14 document.body.nodes.add(element); | 14 document.body.nodes.add(element); |
15 | 15 |
16 var queryById = query('#basic1'); | 16 var queryById = query('#basic1'); |
17 expect(queryById, equals(element)); | 17 expect(queryById, equals(element)); |
(...skipping 20 matching lines...) Expand all Loading... |
38 test('type extension inner html', () { | 38 test('type extension inner html', () { |
39 var element = new DivElement(); | 39 var element = new DivElement(); |
40 element.setInnerHtml("<div is='x-basic3' id='basic3'></div>", | 40 element.setInnerHtml("<div is='x-basic3' id='basic3'></div>", |
41 treeSanitizer: new NullTreeSanitizer()); | 41 treeSanitizer: new NullTreeSanitizer()); |
42 document.body.nodes.add(element); | 42 document.body.nodes.add(element); |
43 | 43 |
44 var queryById = query('#basic3'); | 44 var queryById = query('#basic3'); |
45 expect(queryById is DivElement, isTrue); | 45 expect(queryById is DivElement, isTrue); |
46 }); | 46 }); |
47 } | 47 } |
OLD | NEW |