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 polymer.test.bind_mdv_test; | 5 library polymer.test.bind_mdv_test; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:html'; | 8 import 'dart:html'; |
9 import 'package:custom_element/polyfill.dart'; | |
10 import 'package:template_binding/template_binding.dart'; | 9 import 'package:template_binding/template_binding.dart'; |
11 import 'package:observe/observe.dart'; | 10 import 'package:observe/observe.dart'; |
12 import 'package:unittest/html_config.dart'; | 11 import 'package:unittest/html_config.dart'; |
13 import 'package:unittest/unittest.dart'; | 12 import 'package:unittest/unittest.dart'; |
| 13 import 'package:web_components/polyfill.dart'; |
14 | 14 |
15 main() { | 15 main() { |
16 useHtmlConfiguration(); | 16 useHtmlConfiguration(); |
17 | 17 |
18 var registered = loadCustomElementPolyfill().then((_) { | 18 var registered = customElementsReady.then((_) { |
19 document.register('my-div', MyDivElement); | 19 document.register('my-div', MyDivElement); |
20 }); | 20 }); |
21 | 21 |
22 setUp(() => registered); | 22 setUp(() => registered); |
23 | 23 |
24 group('bindModel', bindModelTests); | 24 group('bindModel', bindModelTests); |
25 } | 25 } |
26 | 26 |
27 bindModelTests() { | 27 bindModelTests() { |
28 var div; | 28 var div; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 Future onAttributeChange(Element node) { | 85 Future onAttributeChange(Element node) { |
86 var completer = new Completer(); | 86 var completer = new Completer(); |
87 new MutationObserver((records, observer) { | 87 new MutationObserver((records, observer) { |
88 observer.disconnect(); | 88 observer.disconnect(); |
89 completer.complete(); | 89 completer.complete(); |
90 })..observe(node, attributes: true); | 90 })..observe(node, attributes: true); |
91 scheduleMicrotask(Observable.dirtyCheck); | 91 scheduleMicrotask(Observable.dirtyCheck); |
92 return completer.future; | 92 return completer.future; |
93 } | 93 } |
OLD | NEW |