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

Unified Diff: client/tests/client/samples/total/total_tests.dart

Issue 8363040: Implement measurement using futures (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove duplicated imports from html.dart Created 9 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
« no previous file with comments | « client/tests/client/samples/swarm/swarm_tests.dart ('k') | client/touch/FxUtil.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tests/client/samples/total/total_tests.dart
diff --git a/client/tests/client/samples/total/total_tests.dart b/client/tests/client/samples/total/total_tests.dart
index 3e9271a0dc0a974ee8aa36f8da06651d0bbc15b0..27b362e29c838c582f1ea8ab31a42ea08eeda6c1 100644
--- a/client/tests/client/samples/total/total_tests.dart
+++ b/client/tests/client/samples/total/total_tests.dart
@@ -51,7 +51,7 @@ main() {
Expect.isTrue(years - years.floor() < 0.1, "7/7");
});
- test('HtmlUtils', () {
+ asyncTest('HtmlUtils', 1, () {
Expect.equals("", HtmlUtils.quoteHtml(""));
Expect.equals("&lt;", HtmlUtils.quoteHtml("<"));
Expect.equals("&lt;&lt;&lt;&lt;", HtmlUtils.quoteHtml("<<<<"));
@@ -68,14 +68,16 @@ main() {
body.nodes.add(div);
HtmlUtils.setIntegerProperty(div, "left", 100, "px");
- CSSStyleDeclaration computedStyle = window.getComputedStyle(div, "");
- String valueAsString = computedStyle.getPropertyValue("left");
- // FIXME: Test fails, with valueAsString == "auto". However, setIntegerProperty
- // works when tested in practice, so there is something wrong with recovering
- // the value.
- // Expect.equals("100", valueAsString);
-
- div.remove();
+ div.computedStyle.then((CSSStyleDeclaration computedStyle) {
+ String valueAsString = computedStyle.getPropertyValue("left");
+ // FIXME: Test fails, with valueAsString == "auto". However,
+ // setIntegerProperty works when tested in practice, so there is
+ // something wrong with recovering the value.
+ // Expect.equals("100", valueAsString);
+
+ div.remove();
+ callbackDone();
+ });
});
test('StringUtils', () {
« no previous file with comments | « client/tests/client/samples/swarm/swarm_tests.dart ('k') | client/touch/FxUtil.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698