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

Side by Side Diff: pkg/dev_compiler/test/codegen/lib/html/client_rect_test.dart

Issue 2413073002: Start cleaning up the HTML tests. (Closed)
Patch Set: Unfork expect.dart. Created 4 years, 2 months 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
OLDNEW
1 library ClientRectTest;
2 import 'package:unittest/unittest.dart';
3 import 'package:unittest/html_config.dart';
4 import 'dart:html'; 1 import 'dart:html';
5 2
3 import 'package:minitest/minitest.dart';
4
6 main() { 5 main() {
7
8 var isRectList = 6 var isRectList =
9 predicate((x) => x is List<Rectangle>, 'is a List<Rectangle>'); 7 predicate((x) => x is List<Rectangle>, 'is a List<Rectangle>');
10 8
11 insertTestDiv() { 9 insertTestDiv() {
12 var element = new Element.tag('div'); 10 var element = new Element.tag('div');
13 element.innerHtml = r''' 11 element.innerHtml = r'''
14 A large block of text should go here. Click this 12 A large block of text should go here. Click this
15 block of text multiple times to see each line 13 block of text multiple times to see each line
16 highlight with every click of the mouse button. 14 highlight with every click of the mouse button.
17 '''; 15 ''';
18 document.body.append(element); 16 document.body.append(element);
19 return element; 17 return element;
20 } 18 }
21 19
22 useHtmlConfiguration(); 20 test("ClientRectList test", () {
23
24 test("ClientRectList test", () {
25 insertTestDiv(); 21 insertTestDiv();
26 var range = new Range(); 22 var range = new Range();
27 var rects = range.getClientRects(); 23 var rects = range.getClientRects();
28 expect(rects, isRectList); 24 expect(rects, isRectList);
29 }); 25 });
30 } 26 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/test/codegen/lib/html/cdata_test.dart ('k') | pkg/dev_compiler/test/codegen/lib/html/cross_frame_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698