Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: sky/tests/raw/box_layout.dart

Issue 1192003003: Clean up the tests to be more maintainable. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/tests/framework/stocks-expected.txt ('k') | sky/tests/raw/box_layout-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/app/view.dart'; 4 import 'package:sky/app/view.dart';
5 import 'package:sky/rendering/block.dart'; 5 import 'package:sky/rendering/block.dart';
6 import 'package:sky/rendering/box.dart'; 6 import 'package:sky/rendering/box.dart';
7 import 'package:sky/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';
11 import '../resources/unit.dart';
12 10
13 void main() { 11 void main() {
14 initUnit(); 12 var size = new RenderConstrainedBox(additionalConstraints: new BoxConstraints( ).applyHeight(100.0));
15 13 var inner = new RenderDecoratedBox(decoration: new BoxDecoration(backgroundCol or: const sky.Color(0xFF00FF00)), child: size);
16 test("padding", () { 14 var padding = new RenderPadding(padding: new EdgeDims.all(50.0), child: inner) ;
17 var size = new RenderConstrainedBox(additionalConstraints: new BoxConstraint s().applyHeight(100.0)); 15 var block = new RenderBlock(children: [padding]);
18 var inner = new RenderDecoratedBox(decoration: new BoxDecoration(backgroundC olor: const sky.Color(0xFF00FF00)), child: size); 16 var outer = new RenderDecoratedBox(decoration: new BoxDecoration(backgroundCol or: const sky.Color(0xFF0000FF)), child: block);
19 var padding = new RenderPadding(padding: new EdgeDims.all(50.0), child: inne r); 17 new TestRenderView(outer).endTest();
20 var block = new RenderBlock(children: [padding]);
21 var outer = new RenderDecoratedBox(decoration: new BoxDecoration(backgroundC olor: const sky.Color(0xFF0000FF)), child: block);
22 new TestRenderView(outer);
23 });
24 } 18 }
OLDNEW
« no previous file with comments | « sky/tests/framework/stocks-expected.txt ('k') | sky/tests/raw/box_layout-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698