OLD | NEW |
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('../../lib/unittest/unittest.dart'); | 6 #import('../../pkg/unittest/unittest.dart'); |
7 #import('../../lib/unittest/html_config.dart'); | 7 #import('../../pkg/unittest/html_config.dart'); |
8 #import('dart:html'); | 8 #import('dart:html'); |
9 | 9 |
10 expectLargeRect(ClientRect rect) { | 10 expectLargeRect(ClientRect rect) { |
11 Expect.equals(rect.top, 0); | 11 Expect.equals(rect.top, 0); |
12 Expect.equals(rect.left, 0); | 12 Expect.equals(rect.left, 0); |
13 Expect.isTrue(rect.width > 100); | 13 Expect.isTrue(rect.width > 100); |
14 Expect.isTrue(rect.height > 100); | 14 Expect.isTrue(rect.height > 100); |
15 Expect.equals(rect.bottom, rect.top + rect.height); | 15 Expect.equals(rect.bottom, rect.top + rect.height); |
16 Expect.equals(rect.right, rect.left + rect.width); | 16 Expect.equals(rect.right, rect.left + rect.width); |
17 } | 17 } |
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 }); | 743 }); |
744 | 744 |
745 test('getRange', () { | 745 test('getRange', () { |
746 var range = makeElList().getRange(1, 2); | 746 var range = makeElList().getRange(1, 2); |
747 Expect.isTrue(range is ElementList); | 747 Expect.isTrue(range is ElementList); |
748 Expect.isTrue(range[0] is ImageElement); | 748 Expect.isTrue(range[0] is ImageElement); |
749 Expect.isTrue(range[1] is InputElement); | 749 Expect.isTrue(range[1] is InputElement); |
750 }); | 750 }); |
751 }); | 751 }); |
752 } | 752 } |
OLD | NEW |