OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 import 'dart:html'; |
| 5 import 'package:unittest/unittest.dart'; |
| 6 import 'package:observatory/src/elements/view_footer.dart'; |
| 7 |
| 8 main() { |
| 9 setUp(() { |
| 10 ViewFooterElement.tag.ensureRegistration(); |
| 11 }); |
| 12 test('instantiation', () { |
| 13 final ViewFooterElement e = new ViewFooterElement(); |
| 14 expect(e, isNotNull, reason: 'element correctly created'); |
| 15 }); |
| 16 test('elements created after attachment', () { |
| 17 final ViewFooterElement e = new ViewFooterElement(); |
| 18 expect(e.shadowRoot, isNotNull, reason: 'shadowRoot is created'); |
| 19 expect(e.shadowRoot.children.length, isZero, |
| 20 reason: 'shadowRoot is empty'); |
| 21 document.body.append(e); |
| 22 expect(e.shadowRoot.children.length, isNonZero, |
| 23 reason: 'shadowRoot has elements'); |
| 24 e.remove(); |
| 25 }); |
| 26 } |
OLD | NEW |