981c4b11df
This means all imports of unittest in our test code had to change to include 'lib' in the path. While doing that change I changed the library/imports to the new syntax in the affected files. Review URL: https://codereview.chromium.org//11301046 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14443 260f80e4-7a28-3924-810f-c04153c831b5
31 lines
777 B
Dart
31 lines
777 B
Dart
library ClientRectTest;
|
|
import '../../pkg/unittest/lib/unittest.dart';
|
|
import '../../pkg/unittest/lib/html_config.dart';
|
|
import 'dart:html';
|
|
|
|
main() {
|
|
|
|
var isClientRectList =
|
|
predicate((x) => x is List<ClientRect>, 'is a List<ClientRect>');
|
|
|
|
insertTestDiv() {
|
|
var element = new Element.tag('div');
|
|
element.innerHTML = r'''
|
|
A large block of text should go here. Click this
|
|
block of text multiple times to see each line
|
|
highlight with every click of the mouse button.
|
|
''';
|
|
document.body.nodes.add(element);
|
|
return element;
|
|
}
|
|
|
|
useHtmlConfiguration();
|
|
|
|
test("ClientRectList test", () {
|
|
insertTestDiv();
|
|
var range = document.createRange();
|
|
var rects = range.getClientRects();
|
|
expect(rects, isClientRectList);
|
|
});
|
|
}
|