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

Unified Diff: sky/tests/layout/custom.sky

Issue 1060013005: Make changing your layout manager work. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 8 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/engine/core/dom/Element.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tests/layout/custom.sky
diff --git a/sky/tests/layout/custom.sky b/sky/tests/layout/custom.sky
index 586dd26fe9da23f599c3fc9136b7b5ec776a94be..e212a6e7a018ada1a43069f829e278291f24bdbf 100644
--- a/sky/tests/layout/custom.sky
+++ b/sky/tests/layout/custom.sky
@@ -84,30 +84,39 @@ void main() {
expect(secondChild.offsetWidth, equals(150));
assertNonChangingValues();
- parent.setLayoutManager(null);
+ parent.setLayoutManager(() {
+ parent.width = 250.0;
+ });
window.requestAnimationFrame((_) {
- expect(parent.offsetWidth, equals(300));
- expect(parent.offsetHeight, equals(50));
- expect(parent.offsetTop, equals(0));
- expect(parent.offsetLeft, equals(0));
-
- expect(firstChild.offsetWidth, equals(300));
- expect(firstChild.offsetHeight, equals(25));
- expect(firstChild.offsetTop, equals(0));
- expect(firstChild.offsetLeft, equals(0));
-
- expect(secondChild.offsetWidth, equals(300));
- expect(secondChild.offsetHeight, equals(25));
- expect(secondChild.offsetTop, equals(25));
- expect(secondChild.offsetLeft, equals(0));
-
- expect(grandChild.offsetWidth, equals(25));
- expect(grandChild.offsetHeight, equals(25));
- expect(grandChild.offsetTop, equals(0));
- expect(grandChild.offsetLeft, equals(0));
-
- completer.complete();
+ expect(parent.offsetWidth, equals(250));
+ assertNonChangingValues();
+
+ parent.setLayoutManager(null);
+
+ window.requestAnimationFrame((_) {
+ expect(parent.offsetWidth, equals(300));
+ expect(parent.offsetHeight, equals(50));
+ expect(parent.offsetTop, equals(0));
+ expect(parent.offsetLeft, equals(0));
+
+ expect(firstChild.offsetWidth, equals(300));
+ expect(firstChild.offsetHeight, equals(25));
+ expect(firstChild.offsetTop, equals(0));
+ expect(firstChild.offsetLeft, equals(0));
+
+ expect(secondChild.offsetWidth, equals(300));
+ expect(secondChild.offsetHeight, equals(25));
+ expect(secondChild.offsetTop, equals(25));
+ expect(secondChild.offsetLeft, equals(0));
+
+ expect(grandChild.offsetWidth, equals(25));
+ expect(grandChild.offsetHeight, equals(25));
+ expect(grandChild.offsetTop, equals(0));
+ expect(grandChild.offsetLeft, equals(0));
+
+ completer.complete();
+ });
});
});
});
« no previous file with comments | « sky/engine/core/dom/Element.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698