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

Side by Side Diff: sky/tests/widgets/syncs1.dart

Issue 1232063006: Remove "RenderBlock" class from examples that use it without giving it unrestricted height. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 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') | sky/tests/widgets/syncs1-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 'package:sky/widgets/basic.dart'; 5 import 'package:sky/widgets/basic.dart';
6 import 'package:sky/widgets/raised_button.dart'; 6 import 'package:sky/widgets/raised_button.dart';
7 7
8 import '../resources/display_list.dart'; 8 import '../resources/display_list.dart';
9 9
10 class FiddleApp extends App { 10 class FiddleApp extends App {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 key: 'something-else', 57 key: 'something-else',
58 decoration: new BoxDecoration( 58 decoration: new BoxDecoration(
59 backgroundColor: const Color(0xEFFF9F00) 59 backgroundColor: const Color(0xEFFF9F00)
60 ) 60 )
61 )), 61 )),
62 new RaisedButton(child: new Text('PRESS ME TO CHANGE IT BACK'), onPressed: toggle) 62 new RaisedButton(child: new Text('PRESS ME TO CHANGE IT BACK'), onPressed: toggle)
63 ]); 63 ]);
64 } 64 }
65 65
66 Widget build() { 66 Widget build() {
67 return new Block([ 67 return new Flex([
68 new SizedBox( 68 new SizedBox(
69 key: 'flex-example', 69 key: 'flex-example',
70 height: 250.0, 70 height: 250.0,
71 child: arbitrarySetting ? buildFlex1() : buildFlex2() 71 child: arbitrarySetting ? buildFlex1() : buildFlex2()
72 ), 72 ),
73 new SizedBox( 73 new SizedBox(
74 key: 'stack-example', 74 key: 'stack-example',
75 height: 250.0, 75 height: 250.0,
76 child: arbitrarySetting ? buildStack1() : buildStack2() 76 child: arbitrarySetting ? buildStack1() : buildStack2()
77 ) 77 )
78 ]); 78 ],
79 direction: FlexDirection.vertical,
80 alignItems: FlexAlignItems.stretch
81 );
79 } 82 }
80 } 83 }
81 84
82 main() async { 85 main() async {
83 TestRenderView renderViewOverride = new TestRenderView(); 86 TestRenderView renderViewOverride = new TestRenderView();
84 FiddleApp app = new FiddleApp(); 87 FiddleApp app = new FiddleApp();
85 runApp(app, renderViewOverride: renderViewOverride); 88 runApp(app, renderViewOverride: renderViewOverride);
86 await renderViewOverride.checkFrame(); 89 await renderViewOverride.checkFrame();
87 app.toggle(); 90 app.toggle();
88 await renderViewOverride.checkFrame(); 91 await renderViewOverride.checkFrame();
89 app.toggle(); 92 app.toggle();
90 await renderViewOverride.checkFrame(); 93 await renderViewOverride.checkFrame();
91 renderViewOverride.endTest(); 94 renderViewOverride.endTest();
92 } 95 }
OLDNEW
« no previous file with comments | « sky/tests/raw/render_flex-expected.txt ('k') | sky/tests/widgets/syncs1-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698