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

Side by Side Diff: sky/tests/resources/display_list.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/render_flex-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 import 'package:sky/framework/rendering/node.dart'; 2 import 'package:sky/framework/rendering/node.dart';
3 import 'package:sky/framework/rendering/box.dart'; 3 import 'package:sky/framework/rendering/box.dart';
4 import 'dart:sky' as sky; 4 import 'dart:sky' as sky;
5 5
6 typedef void Logger (String s); 6 typedef void Logger (String s);
7 7
8 class TestDisplayList extends RenderNodeDisplayList { 8 class TestDisplayList extends RenderNodeDisplayList {
9 TestDisplayList(double width, double height, this.logger, { this.indent: '' }) : 9 TestDisplayList(double width, double height, this.logger, { this.indent: '' }) :
10 this.width = width, 10 this.width = width,
11 this.height = height, 11 this.height = height,
12 super(width, height) { 12 super(width, height) {
13 log("TestDisplayList() constructor: $width x $height"); 13 log("TestDisplayList() constructor: $width x $height");
14 } 14 }
15 15
16 final String indent; 16 final String indent;
17 final double width; 17 final double width;
18 final double height; 18 final double height;
19 19
20 Logger logger; 20 Logger logger;
21 void log(String s) { 21 void log(String s) {
22 logger("${indent} ${s}"); 22 logger("${indent} ${s}");
23 } 23 }
24 24
25 String explainPaint(sky.Paint paint) { 25 String explainPaint(sky.Paint paint) {
26 return "Paint(0x${paint.color.value.toRadixString(16).padLeft(8, '0')})"; 26 return "Paint(${paint.color})";
27 } 27 }
28 28
29 void save() { 29 void save() {
30 log("save"); 30 log("save");
31 } 31 }
32 32
33 void saveLayer(sky.Rect bounds, sky.Paint paint) { 33 void saveLayer(sky.Rect bounds, sky.Paint paint) {
34 log("saveLayer(${bounds.top}:${bounds.left}:${bounds.bottom}:${bounds.right} , ${explainPaint(paint)})"); 34 log("saveLayer(${bounds.top}:${bounds.left}:${bounds.bottom}:${bounds.right} , ${explainPaint(paint)})");
35 } 35 }
36 36
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 void set root(RenderBox value) { 136 void set root(RenderBox value) {
137 _renderView.child = value; 137 _renderView.child = value;
138 } 138 }
139 void _beginFrame(double timeStamp) { 139 void _beginFrame(double timeStamp) {
140 RenderNode.flushLayout(); 140 RenderNode.flushLayout();
141 _renderView.paintFrame(); 141 _renderView.paintFrame();
142 print(_renderView.lastPaint); // TODO(ianh): figure out how to make this fit the unit testing framework better 142 print(_renderView.lastPaint); // TODO(ianh): figure out how to make this fit the unit testing framework better
143 } 143 }
144 144
145 } 145 }
OLDNEW
« no previous file with comments | « sky/tests/raw/render_flex-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698