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

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

Issue 1177043008: Make it possible to test that the stock app doesn't crash on startup and paints the basic scaffold … (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/raw/box_layout-expected.txt ('k') | sky/tests/raw/padding_deflate-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 // 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
7 import 'package:sky/framework/rendering/box.dart';
8 import 'package:sky/framework/rendering/object.dart';
9
10 import '../resources/display_list.dart';
6 import '../resources/third_party/unittest/unittest.dart'; 11 import '../resources/third_party/unittest/unittest.dart';
7 import '../resources/unit.dart'; 12 import '../resources/unit.dart';
8 import '../resources/display_list.dart';
9 import 'package:sky/framework/rendering/box.dart';
10 import 'package:sky/framework/rendering/object.dart';
11 13
12 void main() { 14 void main() {
13 initUnit(); 15 initUnit();
14 16
15 test("should not have a 0 sized colored Box", () { 17 test("should not have a 0 sized colored Box", () {
16 var coloredBox = new RenderDecoratedBox( 18 var coloredBox = new RenderDecoratedBox(
17 decoration: new BoxDecoration() 19 decoration: new BoxDecoration()
18 ); 20 );
19 var paddingBox = new RenderPadding(padding: const EdgeDims.all(10.0), 21 var paddingBox = new RenderPadding(padding: const EdgeDims.all(10.0),
20 child: coloredBox); 22 child: coloredBox);
21 RenderBox root = new RenderDecoratedBox( 23 RenderBox root = new RenderDecoratedBox(
22 decoration: new BoxDecoration(), 24 decoration: new BoxDecoration(),
23 child: paddingBox 25 child: paddingBox
24 ); 26 );
25 TestView renderView = new TestView(child: root); 27 new TestRenderView(root);
26 renderView.attach();
27 renderView.rootConstraints = new ViewConstraints(width: sky.view.width, heig ht: sky.view.height);
28 renderView.scheduleInitialLayout();
29 RenderObject.flushLayout();
30 expect(coloredBox.size.width, equals(sky.view.width - 20)); 28 expect(coloredBox.size.width, equals(sky.view.width - 20));
31 expect(coloredBox.size.height, equals(sky.view.height - 20)); 29 expect(coloredBox.size.height, equals(sky.view.height - 20));
32 }); 30 });
33 } 31 }
OLDNEW
« no previous file with comments | « sky/tests/raw/box_layout-expected.txt ('k') | sky/tests/raw/padding_deflate-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698