| 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:expect/minitest.dart'; | 7 import 'package:expect/minitest.dart'; |
| 8 | 8 |
| 9 import '../utils.dart'; | 9 import '../utils.dart'; |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 get thisIsAlsoACustomClass => true; | 32 get thisIsAlsoACustomClass => true; |
| 33 } | 33 } |
| 34 | 34 |
| 35 class BadB { | 35 class BadB { |
| 36 } | 36 } |
| 37 | 37 |
| 38 abstract class BadC extends HtmlElement { | 38 abstract class BadC extends HtmlElement { |
| 39 BadC.created() : super.created(); | 39 BadC.created() : super.created(); |
| 40 } | 40 } |
| 41 | 41 |
| 42 class BadF implements HtmlElement { /// compile-time error | 42 class BadF implements HtmlElement { //# compile-time error |
| 43 static final tag = 'x-tag-f'; | 43 static final tag = 'x-tag-f'; |
| 44 factory BadF() => new Element.tag(tag); | 44 factory BadF() => new Element.tag(tag); |
| 45 } | 45 } |
| 46 | 46 |
| 47 main() { | 47 main() { |
| 48 // Adapted from Blink's fast/dom/custom/document-register-basic test. | 48 // Adapted from Blink's fast/dom/custom/document-register-basic test. |
| 49 | 49 |
| 50 setUp(() => customElementsReady); | 50 setUp(() => customElementsReady); |
| 51 | 51 |
| 52 test('Testing document.registerElement() basic behaviors', () { | 52 test('Testing document.registerElement() basic behaviors', () { |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 expect((container.firstChild as Bar).tagName, "X-BAR"); | 137 expect((container.firstChild as Bar).tagName, "X-BAR"); |
| 138 expect(container.lastChild is Bar, isTrue); | 138 expect(container.lastChild is Bar, isTrue); |
| 139 expect((container.lastChild as Bar).tagName, "X-BAR"); | 139 expect((container.lastChild as Bar).tagName, "X-BAR"); |
| 140 | 140 |
| 141 // Constructors shouldn't interfere with each other | 141 // Constructors shouldn't interfere with each other |
| 142 expect((new Foo()).tagName, "X-FOO"); | 142 expect((new Foo()).tagName, "X-FOO"); |
| 143 expect((new Bar()).tagName, "X-BAR"); | 143 expect((new Bar()).tagName, "X-BAR"); |
| 144 expect((new Baz()).tagName, "X-BAZ"); | 144 expect((new Baz()).tagName, "X-BAZ"); |
| 145 }); | 145 }); |
| 146 } | 146 } |
| OLD | NEW |