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

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

Issue 558673004: update polymer js to 0.4.0 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: review updates Created 6 years, 3 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
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'dart:async';
6 import 'dart:html';
7 import 'package:polymer/polymer.dart';
8 import 'package:unittest/unittest.dart';
9 import 'package:unittest/html_config.dart';
10
11 int testsRun = 0;
12
13 @CustomTag('decoration-test')
14 class DecorationTest extends PolymerElement {
15 List<int> options = [1, 2, 3, 4];
16
17 DecorationTest.created() : super.created();
18
19 ready() {
20 this.test();
21 testsRun++;
22 }
23
24 test() {
25 expect($['select'].children.length, 5,
26 reason: 'attribute template stamped');
27 }
28 }
29
30 @CustomTag('decoration-test2')
31 class DecorationTest2 extends DecorationTest {
32 List<List<int>> arrs = [ [1,2,3], [4,5,6] ];
33
34 DecorationTest2.created() : super.created();
35
36 test() {
37 expect($['tbody'].children.length, 3,
38 reason: 'attribute template stamped');
39 expect($['tbody'].children[1].children.length, 4,
40 reason: 'attribute sub-template stamped');
41 }
42 }
43
44 main() => initPolymer().run(() {
45 useHtmlConfiguration();
46
47 setUp(() => Polymer.onReady);
48
49 test('declaration-tests-ran', () {
50 // TODO(jakemac): Change this to '2' once http://dartbug.com/20197 is fixed.
51 expect(testsRun, 3, reason: 'decoration-tests-ran');
52 });
53 });
OLDNEW
« no previous file with comments | « pkg/polymer/test/platform_less_test_import.html ('k') | pkg/polymer/test/template_attr_template_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698