Files
sdk/tests/html/client_rect_test.dart
T
blois@google.com a9a2c026f2 Removing more APIs from Document.
Basically hiding APIs which are either redundant or should be on HtmlDocument rather than Document.

BUG=6989

Review URL: https://codereview.chromium.org//11470009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15855 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 19:04:28 +00:00

31 lines
766 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 = new Range();
var rects = range.getClientRects();
expect(rects, isClientRectList);
});
}