| 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:template_binding/template_binding.dart'; | 9 import 'package:template_binding/template_binding.dart'; |
| 10 import 'package:observe/observe.dart'; | 10 import 'package:observe/observe.dart'; |
| 11 import 'package:observe/mirrors_used.dart'; // make test smaller. |
| 11 import 'package:unittest/html_config.dart'; | 12 import 'package:unittest/html_config.dart'; |
| 12 import 'package:unittest/unittest.dart'; | 13 import 'package:unittest/unittest.dart'; |
| 13 import 'package:web_components/polyfill.dart'; | 14 import 'package:web_components/polyfill.dart'; |
| 14 | 15 |
| 15 main() { | 16 main() { |
| 16 useHtmlConfiguration(); | 17 useHtmlConfiguration(); |
| 17 | 18 |
| 18 var registered = customElementsReady.then((_) { | 19 var registered = customElementsReady.then((_) { |
| 19 document.register('my-div', MyDivElement); | 20 document.register('my-div', MyDivElement); |
| 20 }); | 21 }); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 85 |
| 85 Future onAttributeChange(Element node) { | 86 Future onAttributeChange(Element node) { |
| 86 var completer = new Completer(); | 87 var completer = new Completer(); |
| 87 new MutationObserver((records, observer) { | 88 new MutationObserver((records, observer) { |
| 88 observer.disconnect(); | 89 observer.disconnect(); |
| 89 completer.complete(); | 90 completer.complete(); |
| 90 })..observe(node, attributes: true); | 91 })..observe(node, attributes: true); |
| 91 scheduleMicrotask(Observable.dirtyCheck); | 92 scheduleMicrotask(Observable.dirtyCheck); |
| 92 return completer.future; | 93 return completer.future; |
| 93 } | 94 } |
| OLD | NEW |