OLD | NEW |
---|---|
1 #library('ClientRectTest'); | 1 #library('ClientRectTest'); |
2 #import('../../pkg/unittest/unittest.dart'); | 2 #import('../../pkg/unittest/unittest.dart'); |
3 #import('../../pkg/unittest/html_config.dart'); | 3 #import('../../pkg/unittest/html_config.dart'); |
4 #import('dart:html'); | 4 #import('dart:html'); |
5 | 5 |
6 main() { | 6 main() { |
7 | 7 |
8 insertTestDiv() { | 8 insertTestDiv() { |
9 var element = new Element.tag('div'); | 9 var element = new Element.tag('div'); |
10 element.innerHTML = r''' | 10 element.innerHTML = r''' |
11 A large block of text should go here. Click this | 11 A large block of text should go here. Click this |
12 block of text multiple times to see each line | 12 block of text multiple times to see each line |
13 highlight with every click of the mouse button. | 13 highlight with every click of the mouse button. |
14 '''; | 14 '''; |
15 document.body.nodes.add(element); | 15 document.body.nodes.add(element); |
16 return element; | 16 return element; |
17 } | 17 } |
18 | 18 |
19 useHtmlConfiguration(); | 19 useHtmlConfiguration(); |
20 | 20 |
21 test("ClientRectList test", () { | 21 test("ClientRectList test", () { |
22 insertTestDiv(); | 22 insertTestDiv(); |
23 var range = document.createRange(); | 23 var range = document.createRange(); |
24 List<ClientRect> rects = range.getClientRects(); | 24 List<ClientRect> rects = range.getClientRects(); |
Jennifer Messerly
2012/10/26 02:57:05
fyi, this was a pre-existing problem but: I would
gram
2012/10/26 22:26:27
Done.
| |
25 Expect.isTrue(rects is List<ClientRect>); | 25 expect(rects, new isInstanceOf<List<ClientRect>>('List<ClientRect>')); |
26 }); | 26 }); |
27 } | 27 } |
OLD | NEW |