OLD | NEW |
1 import 'dart:html'; | 1 import 'dart:html'; |
2 | 2 |
3 import 'package:minitest/minitest.dart'; | 3 import 'package:expect/minitest.dart'; |
4 | 4 |
5 main() { | 5 main() { |
6 var isRectList = | 6 var isRectList = |
7 predicate((x) => x is List<Rectangle>, 'is a List<Rectangle>'); | 7 predicate((x) => x is List<Rectangle>, 'is a List<Rectangle>'); |
8 | 8 |
9 insertTestDiv() { | 9 insertTestDiv() { |
10 var element = new Element.tag('div'); | 10 var element = new Element.tag('div'); |
11 element.innerHtml = r''' | 11 element.innerHtml = r''' |
12 A large block of text should go here. Click this | 12 A large block of text should go here. Click this |
13 block of text multiple times to see each line | 13 block of text multiple times to see each line |
14 highlight with every click of the mouse button. | 14 highlight with every click of the mouse button. |
15 '''; | 15 '''; |
16 document.body.append(element); | 16 document.body.append(element); |
17 return element; | 17 return element; |
18 } | 18 } |
19 | 19 |
20 test("ClientRectList test", () { | 20 test("ClientRectList test", () { |
21 insertTestDiv(); | 21 insertTestDiv(); |
22 var range = new Range(); | 22 var range = new Range(); |
23 var rects = range.getClientRects(); | 23 var rects = range.getClientRects(); |
24 expect(rects, isRectList); | 24 expect(rects, isRectList); |
25 }); | 25 }); |
26 } | 26 } |
OLD | NEW |