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 <link rel="components" href="conditional4_component1.html"> | 11 <link rel="components" href="conditional4_component1.html"> |
12 <link rel="components" href="conditional4_component2.html"> | 12 <link rel="components" href="conditional4_component2.html"> |
13 <title></title> | 13 <title></title> |
14 <script type='application/javascript' src="testing.js"></script> | 14 <script type='application/javascript' src="testing.js"></script> |
15 </head> | 15 </head> |
16 <body> | 16 <body> |
17 <template if="cond"> | 17 <template if="cond"> |
18 <x-error></x-error> | 18 <x-error></x-error> |
19 </template> | 19 </template> |
20 <template if="notCond"> | 20 <template if="notCond"> |
21 <x-pass></x-pass> | 21 <x-pass></x-pass> |
22 </template> | 22 </template> |
23 <script type="application/dart"> | 23 <script type="application/dart"> |
24 import 'dart:html'; | 24 import 'dart:html'; |
25 import 'package:web_components/watcher.dart'; | 25 import 'package:web_ui/watcher.dart'; |
26 import 'common.dart'; | 26 import 'common.dart'; |
27 main() { | 27 main() { |
28 window.setTimeout(() { | 28 window.setTimeout(() { |
29 cond = true; | 29 cond = true; |
30 dispatch(); | 30 dispatch(); |
31 window.setTimeout(() { | 31 window.setTimeout(() { |
32 cond = false; | 32 cond = false; |
33 dispatch(); | 33 dispatch(); |
34 // in the end, we should see <x-pass> and not <x-error> | 34 // in the end, we should see <x-pass> and not <x-error> |
35 window.setTimeout(() => window.postMessage('done', '*'), 0); | 35 window.setTimeout(() => window.postMessage('done', '*'), 0); |
36 }, 0); | 36 }, 0); |
37 }, 0); | 37 }, 0); |
38 } | 38 } |
39 </script> | 39 </script> |
40 </body> | 40 </body> |
41 </html> | 41 </html> |
OLD | NEW |