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

Unified Diff: samples/third_party/todomvc/test/markdone_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, 2 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 side-by-side diff with in-line comments
Download patch
Index: samples/third_party/todomvc/test/markdone_test.dart
diff --git a/samples/third_party/todomvc/test/markdone_test.dart b/samples/third_party/todomvc/test/markdone_test.dart
index b9290b6af890f03d39a61572c467454cf625ac3b..38bcaba7e8f3c267279e513f52f5613578ead671 100644
--- a/samples/third_party/todomvc/test/markdone_test.dart
+++ b/samples/third_party/todomvc/test/markdone_test.dart
@@ -4,6 +4,7 @@
library todomvc.test.markdone_test;
+import 'dart:async';
import 'dart:html';
import 'package:polymer/polymer.dart';
import 'package:unittest/unittest.dart';
@@ -46,12 +47,14 @@ Node findShadowHost(Node node, ShadowRoot root) {
* This test runs the TodoMVC app, adds a few todos, marks some as done
* programatically, and clicks on a checkbox to mark others via the UI.
*/
-@initMethod init() {
+main() {
+ initPolymer();
useHtmlConfiguration();
+ wrapMicrotask((){
setUp(() => Polymer.onReady);
- test('mark done', () {
+ test('mark done', wrapMicrotask(() {
appModel.todos.add(new Todo('one (unchecked)'));
appModel.todos.add(new Todo('two (unchecked)'));
appModel.todos.add(new Todo('three (checked)')..done = true);
@@ -71,5 +74,6 @@ Node findShadowHost(Node node, ShadowRoot root) {
node.dispatchEvent(new MouseEvent('click', detail: 1));
expect(node.checked, isTrue, reason: 'element is checked');
- });
+ }));
+ })();
}

Powered by Google App Engine
This is Rietveld 408576698