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 20 matching lines...) Expand all Loading... |
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 | 40 |
41 var greetings = ['hello', 'hi']; | 41 @observable |
42 var names = ['world', 'universe']; | 42 var greetings = toObservable(['hello', 'hi']); |
43 var endings = ['??', '!!']; | 43 |
| 44 @observable |
| 45 var names = toObservable(['world', 'universe']); |
| 46 |
| 47 @observable |
| 48 var endings = toObservable(['??', '!!']); |
| 49 |
44 main() { | 50 main() { |
45 window.setTimeout(() { | 51 window.setTimeout(() { |
46 expect(query('x-greeter').attributes, { 'title': 'world' }); | 52 expect(query('x-greeter').attributes, { 'title': 'world' }); |
47 window.postMessage('done', '*'); | 53 window.postMessage('done', '*'); |
48 }, 0); | 54 }, 0); |
49 } | 55 } |
50 </script> | 56 </script> |
51 </body> | 57 </body> |
52 </html> | 58 </html> |
OLD | NEW |