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

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

Issue 12605003: Converting Element.client*, offset* and Screen.avail* over to Rects (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « sdk/lib/svg/dartium/svg_dartium.dart ('k') | tools/dom/scripts/htmlrenamer.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library ElementTest; 5 library ElementTest;
6 import '../../pkg/unittest/lib/unittest.dart'; 6 import '../../pkg/unittest/lib/unittest.dart';
7 import '../../pkg/unittest/lib/html_individual_config.dart'; 7 import '../../pkg/unittest/lib/html_individual_config.dart';
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:html'; 9 import 'dart:html';
10 import 'dart:svg' as svg; 10 import 'dart:svg' as svg;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 final container = new Element.tag("div"); 53 final container = new Element.tag("div");
54 container.style.position = 'absolute'; 54 container.style.position = 'absolute';
55 container.style.top = '8px'; 55 container.style.top = '8px';
56 container.style.left = '8px'; 56 container.style.left = '8px';
57 final element = new Element.tag("div"); 57 final element = new Element.tag("div");
58 element.style.width = '200px'; 58 element.style.width = '200px';
59 element.style.height = '200px'; 59 element.style.height = '200px';
60 container.children.add(element); 60 container.children.add(element);
61 document.body.children.add(container); 61 document.body.children.add(container);
62 62
63 expect(element.clientWidth, greaterThan(100)); 63 expect(element.client.width, greaterThan(100));
64 expect(element.clientHeight, greaterThan(100)); 64 expect(element.client.height, greaterThan(100));
65 expect(element.offsetWidth, greaterThan(100)); 65 expect(element.offset.width, greaterThan(100));
66 expect(element.offsetHeight, greaterThan(100)); 66 expect(element.offset.height, greaterThan(100));
67 expect(element.scrollWidth, greaterThan(100)); 67 expect(element.scrollWidth, greaterThan(100));
68 expect(element.scrollHeight, greaterThan(100)); 68 expect(element.scrollHeight, greaterThan(100));
69 expect(element.getBoundingClientRect().left, 8); 69 expect(element.getBoundingClientRect().left, 8);
70 expect(element.getBoundingClientRect().top, 8); 70 expect(element.getBoundingClientRect().top, 8);
71 container.remove(); 71 container.remove();
72 }); 72 });
73 }); 73 });
74 74
75 group('constructors', () { 75 group('constructors', () {
76 test('error', () { 76 test('error', () {
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 }); 633 });
634 634
635 test('getRange', () { 635 test('getRange', () {
636 var range = makeElList().getRange(1, 2); 636 var range = makeElList().getRange(1, 2);
637 expect(range, isElementList); 637 expect(range, isElementList);
638 expect(range[0], isImageElement); 638 expect(range[0], isImageElement);
639 expect(range[1], isInputElement); 639 expect(range[1], isInputElement);
640 }); 640 });
641 }); 641 });
642 } 642 }
OLDNEW
« no previous file with comments | « sdk/lib/svg/dartium/svg_dartium.dart ('k') | tools/dom/scripts/htmlrenamer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698