Rename editing2/ and theme2/ to editing/ and theme/.
Flesh out a README.md file for the SDK. Make the stocks app test wait for the app to be mounted, to catch some more errors, like typos in the mount callback. R=abarth@chromium.org Review URL: https://codereview.chromium.org/1182053012.
This commit is contained in:
@@ -6,9 +6,9 @@ import 'dart:sky';
|
||||
|
||||
import 'package:mojom/intents/intents.mojom.dart';
|
||||
import 'package:sky/framework/shell.dart' as shell;
|
||||
import 'package:sky/theme2/colors.dart' as colors;
|
||||
import 'package:sky/theme2/edges.dart';
|
||||
import 'package:sky/theme2/typography.dart' as typography;
|
||||
import 'package:sky/theme/colors.dart' as colors;
|
||||
import 'package:sky/theme/edges.dart';
|
||||
import 'package:sky/theme/typography.dart' as typography;
|
||||
import 'package:sky/widgets/material.dart';
|
||||
import 'package:sky/widgets/raised_button.dart';
|
||||
import 'package:sky/widgets/scaffold.dart';
|
||||
|
||||
@@ -51,4 +51,52 @@ PAINT FOR FRAME #2 ----------------------------------------------
|
||||
2 | | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
2 | | | | restore
|
||||
------------------------------------------------------------------------
|
||||
PAINTED 2 FRAMES
|
||||
CONSOLE:
|
||||
PAINT FOR FRAME #3 ----------------------------------------------
|
||||
3 | TestDisplayList() constructor: 800.0 x 600.0
|
||||
3 | paintChild RenderStack at Point(0.0, 0.0)
|
||||
3 | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
3 | | paintChild RenderScaffold at Point(0.0, 0.0)
|
||||
3 | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
3 | | | paintChild RenderDecoratedBox at Point(0.0, 81.0)
|
||||
3 | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
3 | | | | drawRect(Rect.fromLTRB(0.0, 0.0, 800.0, 519.0), Paint(color:Color(0xfffafafa)))
|
||||
3 | | | | save
|
||||
3 | | | | clipRect(Rect.fromLTRB(0.0, 0.0, 800.0, 519.0))
|
||||
3 | | | | save
|
||||
3 | | | | concat([1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0])
|
||||
3 | | | | restore
|
||||
3 | | | | restore
|
||||
3 | | | paintChild RenderDecoratedBox at Point(0.0, 0.0)
|
||||
3 | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
3 | | | | drawRect(Rect.fromLTRB(0.0, 0.0, 800.0, 81.0), Paint(color:Color(0xff9c27b0), drawLooper:true))
|
||||
3 | | | | paintChild RenderFlex at Point(8.0, 0.0)
|
||||
3 | | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
3 | | | | | paintChild RenderConstrainedBox at Point(0.0, 25.0)
|
||||
3 | | | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
3 | | | | | | paintChild RenderPadding at Point(0.0, 8.0)
|
||||
3 | | | | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
3 | | | | | | | paintChild RenderImage at Point(8.0, 8.0)
|
||||
3 | | | | | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
3 | | | | | | paintChild RenderPadding at Point(40.0, 16.0)
|
||||
3 | | | | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
3 | | | | | | | paintChild RenderParagraph at Point(24.0, 0.0)
|
||||
3 | | | | | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
3 | | | | | | paintChild RenderPadding at Point(704.0, 8.0)
|
||||
3 | | | | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
3 | | | | | | | paintChild RenderImage at Point(8.0, 8.0)
|
||||
3 | | | | | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
3 | | | | | | paintChild RenderPadding at Point(744.0, 8.0)
|
||||
3 | | | | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
3 | | | | | | | paintChild RenderImage at Point(8.0, 8.0)
|
||||
3 | | | | | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
3 | | | paintChild RenderDecoratedBox at Point(728.0, 528.0)
|
||||
3 | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
3 | | | | drawCircle(28.0, 28.0, 28.0, Paint(color:Color(0xfff44336), drawLooper:true))
|
||||
3 | | | | saveLayer(Rect.fromLTRB(0.0, 0.0, 56.0, 56.0), Paint(color:Color(0xff000000)))
|
||||
3 | | | | clipPath(Instance of 'Path')
|
||||
3 | | | | paintChild RenderImage at Point(16.0, 16.0)
|
||||
3 | | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
3 | | | | restore
|
||||
------------------------------------------------------------------------
|
||||
PAINTED 3 FRAMES
|
||||
|
||||
@@ -9,9 +9,23 @@ import 'package:sky/widgets/widget.dart';
|
||||
import '../../examples/stocks2/lib/stock_app.dart';
|
||||
import '../resources/display_list.dart';
|
||||
|
||||
class TestStocksApp extends StocksApp {
|
||||
|
||||
Completer _completer = new Completer();
|
||||
Future get isMounted => _completer.future;
|
||||
|
||||
void didMount() {
|
||||
super.didMount();
|
||||
_completer.complete();
|
||||
}
|
||||
}
|
||||
|
||||
main() async {
|
||||
TestRenderView testRenderView = new TestRenderView();
|
||||
runApp(new StocksApp(), renderViewOverride: testRenderView);
|
||||
TestStocksApp app = new TestStocksApp();
|
||||
runApp(app, renderViewOverride: testRenderView);
|
||||
await testRenderView.checkFrame();
|
||||
await app.isMounted;
|
||||
await testRenderView.checkFrame();
|
||||
testRenderView.endTest();
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ import 'package:sky/rendering/object.dart';
|
||||
import '../resources/display_list.dart';
|
||||
import '../resources/third_party/unittest/unittest.dart';
|
||||
import '../resources/unit.dart';
|
||||
import 'package:sky/theme2/colors.dart';
|
||||
import 'package:sky/theme2/shadows.dart';
|
||||
import 'package:sky/theme/colors.dart';
|
||||
import 'package:sky/theme/shadows.dart';
|
||||
|
||||
void main() {
|
||||
initUnit();
|
||||
|
||||
Reference in New Issue
Block a user