Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: tests/html/client_rect_test.dart

Issue 11301046: Restructure pkg/unittest and pkg/webdriver to follow the pub conventions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/html/canvasrenderingcontext2d_test.dart ('k') | tests/html/contentelement_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #library('ClientRectTest'); 1 library ClientRectTest;
2 #import('../../pkg/unittest/unittest.dart'); 2 import '../../pkg/unittest/lib/unittest.dart';
3 #import('../../pkg/unittest/html_config.dart'); 3 import '../../pkg/unittest/lib/html_config.dart';
4 #import('dart:html'); 4 import 'dart:html';
5 5
6 main() { 6 main() {
7 7
8 var isClientRectList = 8 var isClientRectList =
9 predicate((x) => x is List<ClientRect>, 'is a List<ClientRect>'); 9 predicate((x) => x is List<ClientRect>, 'is a List<ClientRect>');
10 10
11 insertTestDiv() { 11 insertTestDiv() {
12 var element = new Element.tag('div'); 12 var element = new Element.tag('div');
13 element.innerHTML = r''' 13 element.innerHTML = r'''
14 A large block of text should go here. Click this 14 A large block of text should go here. Click this
15 block of text multiple times to see each line 15 block of text multiple times to see each line
16 highlight with every click of the mouse button. 16 highlight with every click of the mouse button.
17 '''; 17 ''';
18 document.body.nodes.add(element); 18 document.body.nodes.add(element);
19 return element; 19 return element;
20 } 20 }
21 21
22 useHtmlConfiguration(); 22 useHtmlConfiguration();
23 23
24 test("ClientRectList test", () { 24 test("ClientRectList test", () {
25 insertTestDiv(); 25 insertTestDiv();
26 var range = document.createRange(); 26 var range = document.createRange();
27 var rects = range.getClientRects(); 27 var rects = range.getClientRects();
28 expect(rects, isClientRectList); 28 expect(rects, isClientRectList);
29 }); 29 });
30 } 30 }
OLDNEW
« no previous file with comments | « tests/html/canvasrenderingcontext2d_test.dart ('k') | tests/html/contentelement_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698