| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 4 for details. All rights reserved. Use of this source code is governed by a | 4 for details. All rights reserved. Use of this source code is governed by a |
| 5 BSD-style license that can be found in the LICENSE file. | 5 BSD-style license that can be found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 <html lang="en"> | 7 <html lang="en"> |
| 8 <head> | 8 <head> |
| 9 <meta charset="utf-8"> | 9 <meta charset="utf-8"> |
| 10 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | 10 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 <template iterate="g in greetings"> | 30 <template iterate="g in greetings"> |
| 31 <template iterate="n in names"> | 31 <template iterate="n in names"> |
| 32 <template iterate="e in endings"> | 32 <template iterate="e in endings"> |
| 33 <x-greeter greet-ing="{{g}}" title="{{n}}" ending="{{e}}"></x-greeter> | 33 <x-greeter greet-ing="{{g}}" title="{{n}}" ending="{{e}}"></x-greeter> |
| 34 </template> | 34 </template> |
| 35 </template> | 35 </template> |
| 36 </template> | 36 </template> |
| 37 <script type="application/dart"> | 37 <script type="application/dart"> |
| 38 import 'dart:html'; | 38 import 'dart:html'; |
| 39 import 'package:unittest/unittest.dart'; | 39 import 'package:unittest/unittest.dart'; |
| 40 import 'package:web_ui/observe.dart'; |
| 40 | 41 |
| 41 var greetings = ['hello', 'hi']; | 42 @observable |
| 42 var names = ['world', 'universe']; | 43 var greetings = toObservable(['hello', 'hi']); |
| 43 var endings = ['??', '!!']; | 44 |
| 45 @observable |
| 46 var names = toObservable(['world', 'universe']); |
| 47 |
| 48 @observable |
| 49 var endings = toObservable(['??', '!!']); |
| 50 |
| 44 main() { | 51 main() { |
| 45 window.setTimeout(() { | 52 window.setTimeout(() { |
| 46 expect(query('x-greeter').attributes, { 'title': 'world' }); | 53 expect(query('x-greeter').attributes, { 'title': 'world' }); |
| 47 window.postMessage('done', '*'); | 54 window.postMessage('done', '*'); |
| 48 }, 0); | 55 }, 0); |
| 49 } | 56 } |
| 50 </script> | 57 </script> |
| 51 </body> | 58 </body> |
| 52 </html> | 59 </html> |
| OLD | NEW |