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

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

Issue 225043004: Replace bootstrap logic with 'boot.js', use 'component/dart' mime-type and add (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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.listorder_test; 5 library todomvc.test.listorder_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';
11 import 'package:unittest/html_config.dart'; 11 import 'package:unittest/html_config.dart';
12 import '../web/elements/td_model.dart'; 12 import '../web/elements/td_model.dart';
13 import '../web/elements/td_todos.dart'; 13 import '../web/elements/td_todos.dart';
14 import 'utils.dart'; 14 import 'utils.dart';
15 15
16 /** 16 /**
17 * This test runs the TodoMVC app, adds a few elements, marks some as done, and 17 * This test runs the TodoMVC app, adds a few elements, marks some as done, and
18 * switches from back and forth between "Active" and "All". This will make some 18 * switches from back and forth between "Active" and "All". This will make some
19 * nodes to be hidden and readded to the page. 19 * nodes to be hidden and readded to the page.
20 */ 20 */
21 @initMethod
21 main() { 22 main() {
22 initPolymer();
23 useHtmlConfiguration(); 23 useHtmlConfiguration();
24 24
25 ShadowRoot root; 25 ShadowRoot root;
26 TodoModel model; 26 TodoModel model;
27 27
28 setUp(() => Polymer.onReady.then((_) { 28 setUp(() => Polymer.onReady.then((_) {
29 root = querySelector('td-todos').shadowRoot; 29 root = querySelector('td-todos').shadowRoot;
30 model = querySelector('td-model'); 30 model = querySelector('td-model');
31 return onPropertyInit(model, 'items'); 31 return onPropertyInit(model, 'items');
32 })); 32 }));
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 }); 64 });
65 }); 65 });
66 66
67 test('navigate back to #/', () { 67 test('navigate back to #/', () {
68 windowLocation.hash = '#/'; 68 windowLocation.hash = '#/';
69 return window.animationFrame.then((_) { 69 return window.animationFrame.then((_) {
70 expect(root.querySelectorAll('#todo-list li[is=td-item]').length, 3); 70 expect(root.querySelectorAll('#todo-list li[is=td-item]').length, 3);
71 }); 71 });
72 }); 72 });
73 } 73 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698