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

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

Issue 12225039: Support for observable models, fixes #259 (Closed) Base URL: https://github.com/dart-lang/web-ui.git@master
Patch Set: Round 2, Fight! 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
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">
(...skipping 20 matching lines...) Expand all
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698