OLD | NEW |
| (Empty) |
1 // Copyright (c) 2014, 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 | |
5 library polymer.test.web.web_components_less_test; | |
6 | |
7 import 'dart:html'; | |
8 import 'dart:js'; | |
9 import 'package:polymer/polymer.dart'; | |
10 import 'package:unittest/html_config.dart'; | |
11 import 'package:unittest/unittest.dart'; | |
12 | |
13 int elementsReadied = 0; | |
14 | |
15 @CustomTag('x-import') | |
16 class XImport extends PolymerElement { | |
17 XImport.created() : super.created(); | |
18 | |
19 ready() { | |
20 elementsReadied++; | |
21 } | |
22 } | |
23 | |
24 @CustomTag('x-main') | |
25 class XMain extends PolymerElement { | |
26 XMain.created() : super.created(); | |
27 | |
28 ready() { | |
29 elementsReadied++; | |
30 } | |
31 } | |
32 | |
33 main() => initPolymer().then((zone) => zone.run(() { | |
34 useHtmlConfiguration(); | |
35 | |
36 setUp(() => Polymer.onReady); | |
37 | |
38 test('web-components-less configuration', () { | |
39 var jsDoc = new JsObject.fromBrowserObject(document); | |
40 var htmlImports = context['HTMLImports']; | |
41 | |
42 if (!ShadowRoot.supported || !(new LinkElement()).supportsImport) return; | |
43 | |
44 expect(elementsReadied, 2, reason: 'imported elements upgraded'); | |
45 }); | |
46 })); | |
OLD | NEW |