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

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

Issue 1154903006: Borders. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: now with no broken tests 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
OLDNEW
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 import '../resources/third_party/unittest/unittest.dart'; 6 import '../resources/third_party/unittest/unittest.dart';
7 import '../resources/unit.dart'; 7 import '../resources/unit.dart';
8 import '../resources/display_list.dart'; 8 import '../resources/display_list.dart';
9 import 'package:sky/framework/rendering/box.dart'; 9 import 'package:sky/framework/rendering/box.dart';
10 10
11 void main() { 11 void main() {
12 initUnit(); 12 initUnit();
13 13
14 test("should not have a 0 sized colored Box", () { 14 test("should not have a 0 sized colored Box", () {
15 var coloredBox = new RenderDecoratedBox(); 15 var coloredBox = new RenderDecoratedBox(
16 decoration: new BoxDecoration()
17 );
16 var paddingBox = new RenderPadding(padding: const EdgeDims.all(10.0), 18 var paddingBox = new RenderPadding(padding: const EdgeDims.all(10.0),
17 child: coloredBox); 19 child: coloredBox);
18 RenderBox root = new RenderDecoratedBox( 20 RenderBox root = new RenderDecoratedBox(
21 decoration: new BoxDecoration(),
19 child: paddingBox 22 child: paddingBox
20 ); 23 );
21 TestView renderView = new TestView(child: root); 24 TestView renderView = new TestView(child: root);
22 renderView.layout(new ViewConstraints(width: sky.view.width, height: sky.vie w.height)); 25 renderView.layout(new ViewConstraints(width: sky.view.width, height: sky.vie w.height));
23 expect(coloredBox.size.width, equals(sky.view.width - 20)); 26 expect(coloredBox.size.width, equals(sky.view.width - 20));
24 expect(coloredBox.size.height, equals(sky.view.height - 20)); 27 expect(coloredBox.size.height, equals(sky.view.height - 20));
25 }); 28 });
26 } 29 }
OLDNEW
« sky/sdk/lib/framework/rendering/box.dart ('K') | « sky/sdk/lib/framework/rendering/box.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698