OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 import 'dart:sky' as sky; | 5 import 'dart:sky' as sky; |
6 | 6 |
7 import 'package:sky/rendering/box.dart'; | 7 import 'package:sky/rendering/box.dart'; |
8 import 'package:sky/rendering/object.dart'; | 8 import 'package:sky/rendering/object.dart'; |
9 | 9 |
10 import '../resources/display_list.dart'; | 10 import '../resources/display_list.dart'; |
11 import '../resources/third_party/unittest/unittest.dart'; | 11 import '../resources/third_party/unittest/unittest.dart'; |
12 import '../resources/unit.dart'; | 12 import '../resources/unit.dart'; |
13 import 'package:sky/theme2/colors.dart'; | 13 import 'package:sky/theme/colors.dart'; |
14 import 'package:sky/theme2/shadows.dart'; | 14 import 'package:sky/theme/shadows.dart'; |
15 | 15 |
16 void main() { | 16 void main() { |
17 initUnit(); | 17 initUnit(); |
18 | 18 |
19 test("should size to render view", () { | 19 test("should size to render view", () { |
20 RenderBox root = new RenderDecoratedBox( | 20 RenderBox root = new RenderDecoratedBox( |
21 decoration: new BoxDecoration( | 21 decoration: new BoxDecoration( |
22 backgroundColor: const sky.Color(0xFF00FF00), | 22 backgroundColor: const sky.Color(0xFF00FF00), |
23 gradient: new RadialGradient( | 23 gradient: new RadialGradient( |
24 center: Point.origin, radius: 500.0, | 24 center: Point.origin, radius: 500.0, |
25 colors: [Yellow[500], Blue[500]]), | 25 colors: [Yellow[500], Blue[500]]), |
26 boxShadow: shadows[3]) | 26 boxShadow: shadows[3]) |
27 ); | 27 ); |
28 new TestRenderView(root); | 28 new TestRenderView(root); |
29 expect(root.size.width, equals(sky.view.width)); | 29 expect(root.size.width, equals(sky.view.width)); |
30 expect(root.size.height, equals(sky.view.height)); | 30 expect(root.size.height, equals(sky.view.height)); |
31 }); | 31 }); |
32 } | 32 } |
OLD | NEW |