ef6273cba0
This is a migration of 13 Chrome release about 1.5 years of Chrome releases. Update PYTHON scripts for cleaner and easier rolling. Here's a doc on the changes that might affect Dart users: https://docs.google.com/document/d/1Kj0nk3SueO3JKub8im7z3znu9j5oiI7vf49ejZrMxuE/edit# Change-Id: I768fbd09b04fe6884af36ac102d5813f67bae426 Reviewed-on: https://dart-review.googlesource.com/24501 Commit-Queue: Terry Lucas <terry@google.com> Reviewed-by: Terry Lucas <terry@google.com>
30 lines
722 B
Dart
30 lines
722 B
Dart
library ClientRectTest;
|
|
|
|
import 'package:unittest/unittest.dart';
|
|
import 'package:unittest/html_config.dart';
|
|
import 'dart:html';
|
|
|
|
main() {
|
|
var isRectList = predicate((x) => x is DomRectList, 'is a DomRectList');
|
|
|
|
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.append(element);
|
|
return element;
|
|
}
|
|
|
|
useHtmlConfiguration();
|
|
|
|
test("ClientRectList test", () {
|
|
insertTestDiv();
|
|
var range = new Range();
|
|
var rects = range.getClientRects();
|
|
expect(rects, isRectList);
|
|
});
|
|
}
|