Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Side by Side Diff: test/data/input/element_ctor_test.html

Issue 12225039: Support for observable models, fixes #259 (Closed) Base URL: https://github.com/dart-lang/web-ui.git@master
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/data/input/duplicate_event_listeners_test.html ('k') | test/data/input/empty2_test.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>h4_test</title>
12 <script type='application/javascript' src="testing.js"></script> 11 <script type='application/javascript' src="testing.js"></script>
13 </head> 12 </head>
14 <body> 13 <body>
15 <!-- 14 <!--
16 Regresion test for #222 and #254. This used to try to call 15 Regresion test for #222 and #254. This used to try to call
17 new HeadingElement() and new Element() from generated Dart code, but that 16 new HeadingElement() and new Element() from generated Dart code, but that
18 constructor doesn't exist. 17 constructor doesn't exist.
19 --> 18 -->
20 <p>This tests data binding of heading.</p> 19 <p>This tests data binding of heading.</p>
21 <template if="true"> 20 <template if="true">
22 <h4>{{result}}</h4> 21 <h4>{{result}}</h4>
23 </template> 22 </template>
24 <p>This tests data binding of strong.</p> 23 <p>This tests data binding of strong.</p>
25 <template if="true"> 24 <template if="true">
26 <strong>{{result}}</strong> 25 <strong>{{result}}</strong>
27 </template> 26 </template>
28 <h4 id="fail">FAIL - some tests failed</h4> 27 <h4>You should see two "PASS" above.</h4>
29 <script type="application/dart"> 28 <script type="application/dart">
30 import 'dart:html'; 29 import 'dart:html';
31 import 'package:unittest/unittest.dart'; 30 import 'package:unittest/unittest.dart';
32 import 'package:web_ui/watcher.dart'; 31 import 'package:web_ui/observe.dart';
33 32
34 var result = 'FAIL'; 33 @observable var result = 'FAIL';
35 34
36 main() { 35 main() {
37 window.setTimeout(() { 36 window.setTimeout(() {
38 result = 'PASS'; 37 result = 'PASS';
39 dispatch(); 38 window.setImmediate(() => window.postMessage('done', '*'));
40 query('#fail').style.display = 'none';
41 window.setTimeout(() => window.postMessage('done', '*'), 0);
42 }, 0); 39 }, 0);
43 } 40 }
44 </script> 41 </script>
45 </body> 42 </body>
46 </html> 43 </html>
OLDNEW
« no previous file with comments | « test/data/input/duplicate_event_listeners_test.html ('k') | test/data/input/empty2_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698