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

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

Issue 2754583002: Fix equality invocation on native objects (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import 'dart:html'; 1 import 'dart:html';
2 2
3 import 'package:expect/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
27 test("ClientRect ==", () {
28 var rect1 = document.body.getBoundingClientRect();
29 var rect2 = document.body.getBoundingClientRect();
30 expect(rect1, equals(rect2));
31 });
26 } 32 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698