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

Side by Side Diff: samples/third_party/todomvc/test/markdone_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
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 library todomvc.test.markdone_test; 5 library todomvc.test.markdone_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'package:polymer/polymer.dart'; 9 import 'package:polymer/polymer.dart';
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
(...skipping 14 matching lines...) Expand all
25 var r = findWithText(n, text); 25 var r = findWithText(n, text);
26 if (r != null) return r; 26 if (r != null) return r;
27 } 27 }
28 return null; 28 return null;
29 } 29 }
30 30
31 /** 31 /**
32 * This test runs the TodoMVC app, adds a few todos, marks some as done 32 * This test runs the TodoMVC app, adds a few todos, marks some as done
33 * programatically, and clicks on a checkbox to mark others via the UI. 33 * programatically, and clicks on a checkbox to mark others via the UI.
34 */ 34 */
35 @initMethod
36 main() { 35 main() {
36 initPolymer();
37 useHtmlConfiguration(); 37 useHtmlConfiguration();
38 38
39 TodoModel model; 39 TodoModel model;
40 40
41 setUp(() => Polymer.onReady.then((_) { 41 setUp(() => Polymer.onReady.then((_) {
42 model = querySelector('td-model'); 42 model = querySelector('td-model');
43 return onPropertyInit(model, 'items'); 43 return onPropertyInit(model, 'items');
44 })); 44 }));
45 45
46 test('mark done', () { 46 test('mark done', () {
(...skipping 13 matching lines...) Expand all
60 var node = host.querySelector('input'); 60 var node = host.querySelector('input');
61 expect(node is InputElement, true, reason: 'node is a checkbox'); 61 expect(node is InputElement, true, reason: 'node is a checkbox');
62 expect(node.type, 'checkbox', reason: 'node type is checkbox'); 62 expect(node.type, 'checkbox', reason: 'node type is checkbox');
63 expect(node.checked, isFalse, reason: 'element is unchecked'); 63 expect(node.checked, isFalse, reason: 'element is unchecked');
64 64
65 node.dispatchEvent(new MouseEvent('click', detail: 1)); 65 node.dispatchEvent(new MouseEvent('click', detail: 1));
66 expect(node.checked, true, reason: 'element is checked'); 66 expect(node.checked, true, reason: 'element is checked');
67 }); 67 });
68 }); 68 });
69 } 69 }
OLDNEW
« no previous file with comments | « samples/third_party/todomvc/test/markdone_shadow_test.html ('k') | samples/third_party/todomvc/test/markdone_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698