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"> |
11 <title>watch_global_var_test</title> | 11 <title>watch_global_var_test</title> |
12 <script type='application/javascript' src="testing.js"></script> | 12 <script type='application/javascript' src="testing.js"></script> |
13 </head> | 13 </head> |
14 <body> | 14 <body> |
15 <form> | 15 <form> |
16 <input name="a" type="radio" value="Foo" bind-value="name">Foo! | 16 <input name="a" type="radio" value="Foo" bind-value="name">Foo! |
17 <input name="a" type="radio" value="Bar" bind-value="name">Bar! | 17 <input name="a" type="radio" value="Bar" bind-value="name">Bar! |
18 </form> | 18 </form> |
19 <pre>You picked {{name}}. Final value should be 'Bar'</pre> | 19 <pre>You picked {{name}}. Final value should be 'Bar'</pre> |
20 <script type="application/dart"> | 20 <script type="application/dart"> |
21 import 'dart:html'; | 21 import 'dart:html'; |
22 import 'package:web_components/web_components.dart'; | 22 import 'package:web_ui/web_ui.dart'; |
23 import 'package:unittest/unittest.dart'; | 23 import 'package:unittest/unittest.dart'; |
24 | 24 |
25 var name = 'Bar'; | 25 var name = 'Bar'; |
26 var foo = queryAll('input')[0]; | 26 var foo = queryAll('input')[0]; |
27 var bar = queryAll('input')[1]; | 27 var bar = queryAll('input')[1]; |
28 | 28 |
29 main() { | 29 main() { |
30 useShadowDom = false; | 30 useShadowDom = false; |
31 | 31 |
32 expect(foo.checked, false, reason: 'watchers not run yet.'); | 32 expect(foo.checked, false, reason: 'watchers not run yet.'); |
(...skipping 27 matching lines...) Expand all Loading... |
60 expect(foo.checked, true, reason: 'explicitly set this.'); | 60 expect(foo.checked, true, reason: 'explicitly set this.'); |
61 // It would be nice if this was "Foo". | 61 // It would be nice if this was "Foo". |
62 expect(name, 'Bar', reason: 'DOM checked does not fire event.'); | 62 expect(name, 'Bar', reason: 'DOM checked does not fire event.'); |
63 | 63 |
64 window.setTimeout(() => window.postMessage('done', '*'), 0); | 64 window.setTimeout(() => window.postMessage('done', '*'), 0); |
65 }, 0); | 65 }, 0); |
66 } | 66 } |
67 </script> | 67 </script> |
68 </body> | 68 </body> |
69 </html> | 69 </html> |
OLD | NEW |