| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 3 Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 4 for details. All rights reserved. Use of this source code is governed by a | 4 for details. All rights reserved. Use of this source code is governed by a |
| 5 BSD-style license that can be found in the LICENSE file. | 5 BSD-style license that can be found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 <html lang="en"> | 7 <html lang="en"> |
| 8 <head> | 8 <head> |
| 9 <!-- | 9 <!-- |
| 10 This test runs the TodoMVC app, adds a few elements, marks some as done, and | 10 This test runs the TodoMVC app, adds a few elements, marks some as done, and |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 Timer.run(() { | 38 Timer.run(() { |
| 39 appModel.todos.add(new Todo('one (unchecked)')); | 39 appModel.todos.add(new Todo('one (unchecked)')); |
| 40 appModel.todos.add(new Todo('two (checked)')..done = true); | 40 appModel.todos.add(new Todo('two (checked)')..done = true); |
| 41 appModel.todos.add(new Todo('three (unchecked)')); | 41 appModel.todos.add(new Todo('three (unchecked)')); |
| 42 | 42 |
| 43 var root = query('span[is=todo-app]').xtag.shadowRoot; | 43 var root = query('span[is=todo-app]').xtag.shadowRoot; |
| 44 | 44 |
| 45 windowLocation.hash = '#/'; | 45 windowLocation.hash = '#/'; |
| 46 deliverChangeRecords(); | 46 deliverChangeRecords(); |
| 47 expect(root.queryAll('#todo-list li[is=todo-row]').length, 3); | 47 Timer.run(() { |
| 48 expect(root.queryAll('#todo-list li[is=todo-row]').length, 3); |
| 48 | 49 |
| 49 windowLocation.hash = '#/active'; | 50 windowLocation.hash = '#/active'; |
| 50 deliverChangeRecords(); | 51 deliverChangeRecords(); |
| 51 expect(root.queryAll('#todo-list li[is=todo-row]').length, 2); | 52 expect(root.queryAll('#todo-list li[is=todo-row]').length, 2); |
| 52 | 53 |
| 53 windowLocation.hash = '#/completed'; | 54 windowLocation.hash = '#/completed'; |
| 54 deliverChangeRecords(); | 55 deliverChangeRecords(); |
| 55 expect(root.queryAll('#todo-list li[is=todo-row]').length, 1); | 56 expect(root.queryAll('#todo-list li[is=todo-row]').length, 1); |
| 56 | 57 |
| 57 windowLocation.hash = '#/'; | 58 windowLocation.hash = '#/'; |
| 58 deliverChangeRecords(); | 59 deliverChangeRecords(); |
| 59 window.postMessage('done', '*'); | 60 Timer.run(() { |
| 61 window.postMessage('done', '*'); |
| 62 }); |
| 63 }); |
| 60 }); | 64 }); |
| 61 } | 65 } |
| 62 </script> | 66 </script> |
| 63 </body> | 67 </body> |
| 64 </html> | 68 </html> |
| OLD | NEW |