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

Unified Diff: sky/tests/raw/box_layout.dart

Issue 1155303005: Fix logic in RenderPadding. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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
Index: sky/tests/raw/box_layout.dart
diff --git a/sky/tests/raw/box_layout.dart b/sky/tests/raw/box_layout.dart
new file mode 100644
index 0000000000000000000000000000000000000000..7e686632b2494ca89df99ff88d36f01f531c180c
--- /dev/null
+++ b/sky/tests/raw/box_layout.dart
@@ -0,0 +1,24 @@
+import '../resources/third_party/unittest/unittest.dart';
+import '../resources/unit.dart';
+import '../resources/display_list.dart';
+import 'dart:math' as math;
+import 'dart:sky' as sky;
+import 'package:sky/framework/app.dart';
+import 'package:sky/framework/rendering/box.dart';
+import 'package:sky/framework/rendering/block.dart';
+import 'package:sky/framework/rendering/node.dart';
+
+TestApp app;
+
+void main() {
+ initUnit();
+
+ test("padding", () {
+ var size = new RenderSizedBox(desiredSize: new sky.Size(double.INFINITY, 100.0));
+ var inner = new RenderDecoratedBox(decoration: new BoxDecoration(backgroundColor: 0xFF00FF00), child: size);
+ var padding = new RenderPadding(padding: new EdgeDims.all(50.0), child: inner);
+ var block = new RenderBlock(children: [padding]);
+ var outer = new RenderDecoratedBox(decoration: new BoxDecoration(backgroundColor: 0xFF0000FF), child: block);
+ app = new TestApp(outer);
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698