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

Unified Diff: sky/sdk/lib/framework/app.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/stocks2/lib/stock_app.dart ('k') | sky/sdk/lib/framework/widgets/ui_node.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/app.dart
diff --git a/sky/sdk/lib/framework/app.dart b/sky/sdk/lib/framework/app.dart
index 7785088e6970708ec7fb55c78fe63a25710012fd..701821c24f4a2017dd5cf0bd4c1419e775fe2718 100644
--- a/sky/sdk/lib/framework/app.dart
+++ b/sky/sdk/lib/framework/app.dart
@@ -16,7 +16,7 @@ class PointerState {
class AppView {
- AppView([RenderBox root = null]) {
+ AppView({ RenderBox root: null, RenderView renderViewOverride }) {
assert(_app == null);
_app = this;
@@ -25,10 +25,15 @@ class AppView {
scheduler.init();
scheduler.addPersistentFrameCallback(_beginFrame);
- _renderView = new RenderView(child: root);
- _renderView.attach();
- _renderView.rootConstraints = _viewConstraints;
- _renderView.scheduleInitialLayout();
+ if (renderViewOverride == null) {
+ _renderView = new RenderView(child: root);
+ _renderView.attach();
+ _renderView.rootConstraints = _viewConstraints;
+ _renderView.scheduleInitialLayout();
+ } else {
+ _renderView = renderViewOverride;
+ }
+ assert(_renderView != null);
assert(_app == this);
}
« no previous file with comments | « sky/examples/stocks2/lib/stock_app.dart ('k') | sky/sdk/lib/framework/widgets/ui_node.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698