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

Side by Side Diff: pkg/polymer/test/take_attributes_test.dart

Issue 293023008: Bring back initPolymer, allow boot.js only if using "polymer_experimental.html". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « pkg/polymer/test/register_test.html ('k') | pkg/polymer/test/take_attributes_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 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:html'; 5 import 'dart:html';
6 import 'package:unittest/unittest.dart'; 6 import 'package:unittest/unittest.dart';
7 import 'package:unittest/html_config.dart'; 7 import 'package:unittest/html_config.dart';
8 import 'package:polymer/polymer.dart'; 8 import 'package:polymer/polymer.dart';
9 9
10 @CustomTag('x-foo') 10 @CustomTag('x-foo')
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 XArray.created() : super.created(); 42 XArray.created() : super.created();
43 @observable List values; 43 @observable List values;
44 } 44 }
45 45
46 @CustomTag('x-obj') 46 @CustomTag('x-obj')
47 class XObj extends PolymerElement { 47 class XObj extends PolymerElement {
48 XObj.created() : super.created(); 48 XObj.created() : super.created();
49 @observable var values = {}; 49 @observable var values = {};
50 } 50 }
51 51
52 @initMethod 52 main() => initPolymer().run(() {
53 main() {
54 useHtmlConfiguration(); 53 useHtmlConfiguration();
55 54
56 setUp(() => Polymer.onReady); 55 setUp(() => Polymer.onReady);
57 56
58 test('take attributes', () { 57 test('take attributes', () {
59 queryXTag(x) => document.querySelector(x); 58 queryXTag(x) => document.querySelector(x);
60 59
61 expect(queryXTag("#foo0").boolean, true); 60 expect(queryXTag("#foo0").boolean, true);
62 expect(queryXTag("#foo1").boolean, false); 61 expect(queryXTag("#foo1").boolean, false);
63 expect(queryXTag("#foo2").boolean, true); 62 expect(queryXTag("#foo2").boolean, true);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // Array deserialization tests 111 // Array deserialization tests
113 expect(queryXTag("#arr1").values, [0, 1, 2]); 112 expect(queryXTag("#arr1").values, [0, 1, 2]);
114 expect(queryXTag("#arr2").values, [33]); 113 expect(queryXTag("#arr2").values, [33]);
115 // Object deserialization tests 114 // Object deserialization tests
116 expect(queryXTag("#obj1").values, { 'name': 'Brandon', 115 expect(queryXTag("#obj1").values, { 'name': 'Brandon',
117 'nums': [1, 22, 33] }); 116 'nums': [1, 22, 33] });
118 expect(queryXTag("#obj2").values, { "color": "Red" }); 117 expect(queryXTag("#obj2").values, { "color": "Red" });
119 expect(queryXTag("#obj3").values, { 'movie': 'Buckaroo Banzai', 118 expect(queryXTag("#obj3").values, { 'movie': 'Buckaroo Banzai',
120 'DOB': '07/31/1978' }); 119 'DOB': '07/31/1978' });
121 }); 120 });
122 } 121 });
OLDNEW
« no previous file with comments | « pkg/polymer/test/register_test.html ('k') | pkg/polymer/test/take_attributes_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698