Index: client/tests/client/html/ElementTests.dart |
diff --git a/client/tests/client/html/ElementTests.dart b/client/tests/client/html/ElementTests.dart |
index d14f0625ad562f15cc7ff80c90004c04436a95fb..fb3041f9b0cf5804498d9da07e9c726066d0a905 100644 |
--- a/client/tests/client/html/ElementTests.dart |
+++ b/client/tests/client/html/ElementTests.dart |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
@@ -43,9 +43,8 @@ void testConstructorHelper(String tag, String htmlSnippet, |
void testElement() { |
asyncTest('computedStyle', 1, () { |
- final element = document.body; |
- element.computedStyle.then((style) { |
- Expect.equals(style.getPropertyValue('left'), 'auto'); |
+ window.requestMeasurementFrame(() { |
+ Expect.equals(document.body.computedStyle.left, 'auto'); |
callbackDone(); |
}); |
}); |
@@ -61,7 +60,8 @@ void testElement() { |
container.elements.add(element); |
document.body.elements.add(container); |
- element.rect.then((rect) { |
+ window.requestMeasurementFrame(() { |
+ final rect = element.rect; |
expectLargeRect(rect.client); |
expectLargeRect(rect.offset); |
expectLargeRect(rect.scroll); |
@@ -261,7 +261,7 @@ void testElement() { |
}); |
test('eventListeners', () { |
- final element = new Element.tag('div'); |
+ ElementWrappingImplementation element = new Element.tag('div'); |
final on = element.on; |
final rawElement = unwrapDomObject(element); |