diff --git a/engine/src/flutter/home.dart b/engine/src/flutter/home.dart index bf6a4ac066..fbc68aa51f 100644 --- a/engine/src/flutter/home.dart +++ b/engine/src/flutter/home.dart @@ -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'; diff --git a/engine/src/flutter/tests/examples/stocks-expected.txt b/engine/src/flutter/tests/examples/stocks-expected.txt index 0fd23238bd..72854a1f36 100644 --- a/engine/src/flutter/tests/examples/stocks-expected.txt +++ b/engine/src/flutter/tests/examples/stocks-expected.txt @@ -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 diff --git a/engine/src/flutter/tests/examples/stocks.dart b/engine/src/flutter/tests/examples/stocks.dart index b00c484407..6d014daf05 100644 --- a/engine/src/flutter/tests/examples/stocks.dart +++ b/engine/src/flutter/tests/examples/stocks.dart @@ -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(); } diff --git a/engine/src/flutter/tests/raw/render_box.dart b/engine/src/flutter/tests/raw/render_box.dart index 09adcb61b3..094f924b3c 100644 --- a/engine/src/flutter/tests/raw/render_box.dart +++ b/engine/src/flutter/tests/raw/render_box.dart @@ -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();