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

Unified Diff: samples/third_party/todomvc/test/listorder_test.dart

Issue 77373002: "Reverting 30388" (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 side-by-side diff with in-line comments
Download patch
Index: samples/third_party/todomvc/test/listorder_test.dart
diff --git a/samples/third_party/todomvc/test/listorder_test.dart b/samples/third_party/todomvc/test/listorder_test.dart
index 914f4adc48b791d89876bfe425dc1484699f703f..f0599436ad28a0ae3890e07ac2fe0c79e52fa160 100644
--- a/samples/third_party/todomvc/test/listorder_test.dart
+++ b/samples/third_party/todomvc/test/listorder_test.dart
@@ -9,7 +9,9 @@ import 'dart:html';
import 'package:polymer/polymer.dart';
import 'package:unittest/unittest.dart';
import 'package:unittest/html_config.dart';
-import '../web/model.dart';
+import '../web/elements/td_model.dart';
+import '../web/elements/td_todos.dart';
+import 'utils.dart';
/**
* This test runs the TodoMVC app, adds a few elements, marks some as done, and
@@ -21,20 +23,23 @@ main() {
useHtmlConfiguration();
ShadowRoot root;
+ TodoModel model;
setUp(() => Polymer.onReady.then((_) {
- root = querySelector('todo-app').shadowRoot;
+ root = querySelector('td-todos').shadowRoot;
+ model = querySelector('td-model');
+ return onPropertyInit(model, 'items');
}));
test('programmatically add items to model', () {
- appModel.todos.addAll([
+ model.items.addAll([
new Todo('one (unchecked)'),
- new Todo('two (checked)')..done = true,
+ new Todo('two (checked)')..completed = true,
new Todo('three (unchecked)')
]);
Observable.dirtyCheck();
return window.animationFrame.then((_) {
- expect(root.querySelectorAll('#todo-list li[is=todo-row]').length, 3);
+ expect(root.querySelectorAll('#todo-list li[is=td-item]').length, 3);
// TODO(jmesserly): HTML Imports breaks relative hash links when the
// component is at a different path from the main HTML document. For now
@@ -48,21 +53,21 @@ main() {
test('navigate to #/active', () {
windowLocation.hash = '#/active';
return window.animationFrame.then((_) {
- expect(root.querySelectorAll('#todo-list li[is=todo-row]').length, 2);
+ expect(root.querySelectorAll('#todo-list li[is=td-item]').length, 2);
});
});
test('navigate to #/completed', () {
windowLocation.hash = '#/completed';
return window.animationFrame.then((_) {
- expect(root.querySelectorAll('#todo-list li[is=todo-row]').length, 1);
+ expect(root.querySelectorAll('#todo-list li[is=td-item]').length, 1);
});
});
test('navigate back to #/', () {
windowLocation.hash = '#/';
return window.animationFrame.then((_) {
- expect(root.querySelectorAll('#todo-list li[is=todo-row]').length, 3);
+ expect(root.querySelectorAll('#todo-list li[is=td-item]').length, 3);
});
});
}

Powered by Google App Engine
This is Rietveld 408576698