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

Side by Side Diff: samples/third_party/todomvc/test/listorder_test.dart

Issue 27903006: Improves how to initialize polymer apps and fixes polymer build and linter to (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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.listorder_test; 5 library todomvc.test.listorder_test;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'package:polymer/polymer.dart'; 8 import 'package:polymer/polymer.dart';
9 import 'package:polymer/platform.dart' show endOfMicrotask; 9 import 'package:polymer/platform.dart' show endOfMicrotask;
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
11 import 'package:unittest/html_config.dart'; 11 import 'package:unittest/html_config.dart';
12 import '../web/model.dart'; 12 import '../web/model.dart';
13 13
14 /** 14 /**
15 * This test runs the TodoMVC app, adds a few elements, marks some as done, and 15 * This test runs the TodoMVC app, adds a few elements, marks some as done, and
16 * switches from back and forth between "Active" and "All". This will make some 16 * switches from back and forth between "Active" and "All". This will make some
17 * nodes to be hidden and readded to the page. 17 * nodes to be hidden and readded to the page.
18 */ 18 */
19 @initMethod 19 main() {
20 _main() { 20 initPolymer();
21 useHtmlConfiguration(); 21 useHtmlConfiguration();
22 22
23 ShadowRoot root; 23 ShadowRoot root;
24 24
25 setUp(() => Polymer.onReady.then((_) { 25 setUp(() => Polymer.onReady.then((_) {
26 root = query('todo-app').shadowRoot; 26 root = query('todo-app').shadowRoot;
27 })); 27 }));
28 28
29 test('programmatically add items to model', () { 29 test('programmatically add items to model', () {
30 appModel.todos.addAll([ 30 appModel.todos.addAll([
(...skipping 27 matching lines...) Expand all
58 })); 58 }));
59 }); 59 });
60 60
61 test('navigate back to #/', () { 61 test('navigate back to #/', () {
62 windowLocation.hash = '#/'; 62 windowLocation.hash = '#/';
63 endOfMicrotask(expectAsync0(() { 63 endOfMicrotask(expectAsync0(() {
64 expect(root.queryAll('#todo-list li[is=todo-row]').length, 3); 64 expect(root.queryAll('#todo-list li[is=todo-row]').length, 3);
65 })); 65 }));
66 }); 66 });
67 } 67 }
OLDNEW
« no previous file with comments | « pkg/polymer/test/take_attributes_test.html ('k') | samples/third_party/todomvc/test/listorder_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698