OLD | NEW |
1 import 'dart:math' as math; | 1 import 'dart:math' as math; |
2 import 'dart:sky' as sky; | 2 import 'dart:sky' as sky; |
3 | 3 |
4 import 'package:sky/framework/app.dart'; | 4 import 'package:sky/app/view.dart'; |
5 import 'package:sky/framework/rendering/block.dart'; | 5 import 'package:sky/rendering/block.dart'; |
6 import 'package:sky/framework/rendering/box.dart'; | 6 import 'package:sky/rendering/box.dart'; |
7 import 'package:sky/framework/rendering/object.dart'; | 7 import 'package:sky/rendering/object.dart'; |
8 | 8 |
9 import '../resources/display_list.dart'; | 9 import '../resources/display_list.dart'; |
10 import '../resources/third_party/unittest/unittest.dart'; | 10 import '../resources/third_party/unittest/unittest.dart'; |
11 import '../resources/unit.dart'; | 11 import '../resources/unit.dart'; |
12 | 12 |
13 void main() { | 13 void main() { |
14 initUnit(); | 14 initUnit(); |
15 | 15 |
16 test("padding", () { | 16 test("padding", () { |
17 var size = new RenderSizedBox(desiredSize: new sky.Size(double.INFINITY, 100
.0)); | 17 var size = new RenderSizedBox(desiredSize: new sky.Size(double.INFINITY, 100
.0)); |
18 var inner = new RenderDecoratedBox(decoration: new BoxDecoration(backgroundC
olor: const sky.Color(0xFF00FF00)), child: size); | 18 var inner = new RenderDecoratedBox(decoration: new BoxDecoration(backgroundC
olor: const sky.Color(0xFF00FF00)), child: size); |
19 var padding = new RenderPadding(padding: new EdgeDims.all(50.0), child: inne
r); | 19 var padding = new RenderPadding(padding: new EdgeDims.all(50.0), child: inne
r); |
20 var block = new RenderBlock(children: [padding]); | 20 var block = new RenderBlock(children: [padding]); |
21 var outer = new RenderDecoratedBox(decoration: new BoxDecoration(backgroundC
olor: const sky.Color(0xFF0000FF)), child: block); | 21 var outer = new RenderDecoratedBox(decoration: new BoxDecoration(backgroundC
olor: const sky.Color(0xFF0000FF)), child: block); |
22 new TestRenderView(outer); | 22 new TestRenderView(outer); |
23 }); | 23 }); |
24 } | 24 } |
OLD | NEW |