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

Side by Side Diff: sky/tests/resources/display_list.dart

Issue 1172123003: Fix the Sky tests (Closed) Base URL: git@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/render_box.dart ('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/object.dart'; 2 import 'package:sky/framework/rendering/object.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 RenderObjectDisplayList { 8 class TestDisplayList extends RenderObjectDisplayList {
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,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 RenderObject.debugDoingPaint = false; 118 RenderObject.debugDoingPaint = false;
119 } 119 }
120 120
121 } 121 }
122 122
123 class TestApp { 123 class TestApp {
124 124
125 TestApp(RenderBox root) { 125 TestApp(RenderBox root) {
126 _renderView = new TestView(child: root); 126 _renderView = new TestView(child: root);
127 _renderView.attach(); 127 _renderView.attach();
128 _renderView.layout(new ViewConstraints(width: sky.view.width, height: sky.vi ew.height)); 128 _renderView.rootConstraints = new ViewConstraints(width: sky.view.width, hei ght: sky.view.height);
129 _renderView.scheduleInitialLayout();
130 RenderObject.flushLayout();
129 _renderView.paintFrame(); 131 _renderView.paintFrame();
130 print(_renderView.lastPaint); // TODO(ianh): figure out how to make this fit the unit testing framework better 132 print(_renderView.lastPaint); // TODO(ianh): figure out how to make this fit the unit testing framework better
131 } 133 }
132 134
133 RenderView _renderView; 135 RenderView _renderView;
134 136
135 RenderBox get root => _renderView.child; 137 RenderBox get root => _renderView.child;
136 void set root(RenderBox value) { 138 void set root(RenderBox value) {
137 _renderView.child = value; 139 _renderView.child = value;
138 } 140 }
139 void _beginFrame(double timeStamp) { 141 void _beginFrame(double timeStamp) {
140 RenderObject.flushLayout(); 142 RenderObject.flushLayout();
141 _renderView.paintFrame(); 143 _renderView.paintFrame();
142 print(_renderView.lastPaint); // TODO(ianh): figure out how to make this fit the unit testing framework better 144 print(_renderView.lastPaint); // TODO(ianh): figure out how to make this fit the unit testing framework better
143 } 145 }
144 146
145 } 147 }
OLDNEW
« no previous file with comments | « sky/tests/raw/render_box.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698