| 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 library document_register_basic_test; | 5 library document_register_basic_test; |
| 6 import 'package:unittest/unittest.dart'; | 6 import 'package:unittest/unittest.dart'; |
| 7 import 'package:unittest/html_config.dart'; | 7 import 'package:unittest/html_config.dart'; |
| 8 import 'dart:html'; | 8 import 'dart:html'; |
| 9 import '../utils.dart'; | 9 import '../utils.dart'; |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 get thisIsAlsoACustomClass => true; | 32 get thisIsAlsoACustomClass => true; |
| 33 } | 33 } |
| 34 | 34 |
| 35 class BadB { | 35 class BadB { |
| 36 } | 36 } |
| 37 | 37 |
| 38 class BadE implements HtmlElement { | 38 class BadE implements HtmlElement { |
| 39 static final tag = 'x-tag-e'; | 39 static final tag = 'x-tag-e'; |
| 40 factory BadE() => new Element.tag(tag); | 40 factory BadE() => new Element.tag(tag); |
| 41 BadE.created() : super.created(); | |
| 42 } | 41 } |
| 43 | 42 |
| 44 main() { | 43 main() { |
| 45 useHtmlConfiguration(); | 44 useHtmlConfiguration(); |
| 46 | 45 |
| 47 // Adapted from Blink's fast/dom/custom/document-register-basic test. | 46 // Adapted from Blink's fast/dom/custom/document-register-basic test. |
| 48 | 47 |
| 49 setUp(loadPolyfills); | 48 setUp(loadPolyfills); |
| 50 | 49 |
| 51 test('Testing document.register() basic behaviors', () { | 50 test('Testing document.register() basic behaviors', () { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 expect(container.firstChild.tagName, "X-BAR"); | 132 expect(container.firstChild.tagName, "X-BAR"); |
| 134 expect(container.lastChild is Bar, isTrue); | 133 expect(container.lastChild is Bar, isTrue); |
| 135 expect(container.lastChild.tagName, "X-BAR"); | 134 expect(container.lastChild.tagName, "X-BAR"); |
| 136 | 135 |
| 137 // Constructors shouldn't interfere with each other | 136 // Constructors shouldn't interfere with each other |
| 138 expect((new Foo()).tagName, "X-FOO"); | 137 expect((new Foo()).tagName, "X-FOO"); |
| 139 expect((new Bar()).tagName, "X-BAR"); | 138 expect((new Bar()).tagName, "X-BAR"); |
| 140 expect((new Baz()).tagName, "X-BAZ"); | 139 expect((new Baz()).tagName, "X-BAZ"); |
| 141 }); | 140 }); |
| 142 } | 141 } |
| OLD | NEW |