| 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 'package:expect/expect.dart'; | 7 import 'package:expect/expect.dart'; |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 import 'dart:html'; | 9 import 'dart:html'; |
| 10 import '../../../../swarm/swarm_ui_lib/base/base.dart'; | 10 import '../../../swarm_ui_lib/base/base.dart'; |
| 11 import '../../../../swarm/swarm_ui_lib/layout/layout.dart'; | 11 import '../../../swarm_ui_lib/layout/layout.dart'; |
| 12 import '../../../../swarm/swarm_ui_lib/view/view.dart'; | 12 import '../../../swarm_ui_lib/view/view.dart'; |
| 13 import '../../../../swarm/swarm_ui_lib/util/utilslib.dart'; | 13 import '../../../swarm_ui_lib/util/utilslib.dart'; |
| 14 import '../../../../../pkg/unittest/lib/unittest.dart'; | 14 import 'package:unittest/html_config.dart'; |
| 15 import '../../../../../pkg/unittest/lib/html_config.dart'; | 15 import 'package:unittest/unittest.dart'; |
| 16 | 16 |
| 17 part 'grid_layout_demo.dart'; | 17 part 'grid_layout_demo.dart'; |
| 18 part 'grid_examples.dart'; | 18 part 'grid_examples.dart'; |
| 19 part 'css.dart'; | 19 part 'css.dart'; |
| 20 | 20 |
| 21 // TODO(jmesserly): these tests would be easier to work with if they were WebKit | 21 // TODO(jmesserly): these tests would be easier to work with if they were WebKit |
| 22 // layout tests. The way content shell works is exactly what we want for | 22 // layout tests. The way content shell works is exactly what we want for |
| 23 // testing layout: run the example and then print the element tree with metrics. | 23 // testing layout: run the example and then print the element tree with metrics. |
| 24 // The UnitTestSuite wrapper gets in our way here, because you can't "see" the | 24 // The UnitTestSuite wrapper gets in our way here, because you can't "see" the |
| 25 // test layout visually when you're debugging. | 25 // test layout visually when you're debugging. |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 Expect.equals(values[1], node.offsetTop); | 184 Expect.equals(values[1], node.offsetTop); |
| 185 Expect.equals(values[2], node.offsetWidth); | 185 Expect.equals(values[2], node.offsetWidth); |
| 186 Expect.equals(values[3], node.offsetHeight); | 186 Expect.equals(values[3], node.offsetHeight); |
| 187 }); | 187 }); |
| 188 } | 188 } |
| 189 } | 189 } |
| 190 | 190 |
| 191 Future verifyExample(String example, [Map expected = null]) { | 191 Future verifyExample(String example, [Map expected = null]) { |
| 192 return usingGrid(example, (grid) => verifyGrid(example, expected)); | 192 return usingGrid(example, (grid) => verifyGrid(example, expected)); |
| 193 } | 193 } |
| OLD | NEW |