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 layout_tests; | 5 #library('layout_tests'); |
6 | 6 |
7 import 'dart:html'; | 7 #import('dart:html'); |
8 import '../../../../ui_lib/base/base.dart'; | 8 #import('../../../../ui_lib/base/base.dart'); |
9 import '../../../../ui_lib/layout/layout.dart'; | 9 #import('../../../../ui_lib/layout/layout.dart'); |
10 import '../../../../ui_lib/view/view.dart'; | 10 #import('../../../../ui_lib/view/view.dart'); |
11 import '../../../../ui_lib/util/utilslib.dart'; | 11 #import('../../../../ui_lib/util/utilslib.dart'); |
12 import '../../../../../pkg/unittest/unittest.dart'; | 12 #import('../../../../../pkg/unittest/unittest.dart'); |
13 import '../../../../../pkg/unittest/html_config.dart'; | 13 #import('../../../../../pkg/unittest/html_config.dart'); |
14 | 14 |
15 part 'grid_layout_demo.dart'; | 15 #source('grid_layout_demo.dart'); |
16 part 'grid_examples.dart'; | 16 #source('grid_examples.dart'); |
17 part 'css.dart'; | 17 #source('css.dart'); |
18 | 18 |
19 // TODO(jmesserly): these tests would be easier to work with if they were WebKit | 19 // TODO(jmesserly): these tests would be easier to work with if they were WebKit |
20 // layout tests. The way DumpRenderTree works is exactly what we want for | 20 // layout tests. The way DumpRenderTree works is exactly what we want for |
21 // testing layout: run the example and then print the element tree with metrics. | 21 // testing layout: run the example and then print the element tree with metrics. |
22 // The UnitTestSuite wrapper gets in our way here, because you can't "see" the | 22 // The UnitTestSuite wrapper gets in our way here, because you can't "see" the |
23 // test layout visually when you're debugging. | 23 // test layout visually when you're debugging. |
24 // See these links for more info: | 24 // See these links for more info: |
25 // http://www.webkit.org/quality/testwriting.html | 25 // http://www.webkit.org/quality/testwriting.html |
26 // http://www.w3.org/Style/CSS/Test/guidelines.html | 26 // http://www.w3.org/Style/CSS/Test/guidelines.html |
27 | 27 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 Expect.equals(values[1], offset.top); | 178 Expect.equals(values[1], offset.top); |
179 Expect.equals(values[2], offset.width); | 179 Expect.equals(values[2], offset.width); |
180 Expect.equals(values[3], offset.height); | 180 Expect.equals(values[3], offset.height); |
181 })); | 181 })); |
182 } | 182 } |
183 } | 183 } |
184 | 184 |
185 verifyExample(String example, [Map expected = null]) { | 185 verifyExample(String example, [Map expected = null]) { |
186 usingGrid(example, (grid) => verifyGrid(example, expected)); | 186 usingGrid(example, (grid) => verifyGrid(example, expected)); |
187 } | 187 } |
OLD | NEW |