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/render_box.dart

Issue 1162023004: Update BoxDecoration and RenderParagraph to use sky.Color instead of int. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: test expectations 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/render_box-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 '../resources/third_party/unittest/unittest.dart'; 5 import '../resources/third_party/unittest/unittest.dart';
6 import '../resources/unit.dart'; 6 import '../resources/unit.dart';
7 import '../resources/display_list.dart'; 7 import '../resources/display_list.dart';
8 import 'dart:sky' as sky; 8 import 'dart:sky' as sky;
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 size to render view", () { 14 test("should size to render view", () {
15 RenderSizedBox root = new RenderSizedBox( 15 RenderSizedBox root = new RenderSizedBox(
16 child: new RenderDecoratedBox( 16 child: new RenderDecoratedBox(
17 decoration: new BoxDecoration(backgroundColor: 0xFF00FF00) 17 decoration: new BoxDecoration(backgroundColor: const sky.Color(0xFF00FF0 0))
18 ) 18 )
19 ); 19 );
20 TestView renderView = new TestView(child: root); 20 TestView renderView = new TestView(child: root);
21 renderView.layout(new ViewConstraints(width: sky.view.width, height: sky.vie w.height)); 21 renderView.layout(new ViewConstraints(width: sky.view.width, height: sky.vie w.height));
22 expect(root.size.width, equals(sky.view.width)); 22 expect(root.size.width, equals(sky.view.width));
23 expect(root.size.height, equals(sky.view.height)); 23 expect(root.size.height, equals(sky.view.height));
24 renderView.paintFrame(); 24 renderView.paintFrame();
25 print(renderView.lastPaint); // TODO(ianh): figure out how to make this fit the unit testing framework better 25 print(renderView.lastPaint); // TODO(ianh): figure out how to make this fit the unit testing framework better
26 }); 26 });
27 } 27 }
OLDNEW
« no previous file with comments | « sky/tests/raw/box_layout-expected.txt ('k') | sky/tests/raw/render_box-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698