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

Unified Diff: pkg/template_binding/test/utils.dart

Issue 132403010: big update to observe, template_binding, polymer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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
« no previous file with comments | « pkg/template_binding/test/template_binding_test.dart ('k') | samples/third_party/todomvc/test/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/template_binding/test/utils.dart
diff --git a/pkg/template_binding/test/utils.dart b/pkg/template_binding/test/utils.dart
index 92d63e4e6ff235463acec9437f96484be7bca8da..11f766849afd6ad34375564b03c6bda5ea281a1d 100644
--- a/pkg/template_binding/test/utils.dart
+++ b/pkg/template_binding/test/utils.dart
@@ -4,13 +4,23 @@
library template_binding.test.utils;
+import 'dart:async';
import 'dart:html';
import 'package:observe/observe.dart';
import 'package:template_binding/template_binding.dart';
-import 'package:unittest/unittest.dart';
+export 'package:observe/src/dirty_check.dart' show dirtyCheckZone;
-import 'package:observe/src/microtask.dart';
-export 'package:observe/src/microtask.dart';
+/// A small method to help readability. Used to cause the next "then" in a chain
+/// to happen in the next microtask:
+///
+/// future.then(newMicrotask).then(...)
+endOfMicrotask(_) => new Future.value();
+
+/// A small method to help readability. Used to cause the next "then" in a chain
+/// to happen in the next microtask, after a timer:
+///
+/// future.then(nextMicrotask).then(...)
+nextMicrotask(_) => new Future(() {});
final bool parserHasNativeTemplate = () {
var div = new DivElement()..innerHtml = '<table><template>';
@@ -57,10 +67,6 @@ class FooBarNotifyModel extends ChangeNotifier implements FooBarModel {
}
}
-observeTest(name, testCase) => test(name, wrapMicrotask(testCase));
-
-solo_observeTest(name, testCase) => solo_test(name, wrapMicrotask(testCase));
-
DivElement testDiv;
createTestHtml(s) {
@@ -68,7 +74,7 @@ createTestHtml(s) {
div.setInnerHtml(s, treeSanitizer: new NullTreeSanitizer());
testDiv.append(div);
- for (var node in div.queryAll('*')) {
+ for (var node in div.querySelectorAll('*')) {
if (isSemanticTemplate(node)) TemplateBindExtension.decorate(node);
}
« no previous file with comments | « pkg/template_binding/test/template_binding_test.dart ('k') | samples/third_party/todomvc/test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698