@@ -155,5 +155,32 @@ Item {
155155 show1.created = true;
156156 compare(show1.shown, true, "Showable should automatically show when created changes to true if attempted to show before.");
157157 }
158+
159+ // Test that showNow immediately shows showable
160+ function test_showNow() {
161+ init_test();
162+
163+ show1.opacity = 0.2;
164+
165+ show1.showNow();
166+ compare(show1.shown, true, "Showable should be shown after showNow");
167+ compare(show1.showAnimation.running, false, "Showable should be done running after showNow");
168+ compare(show1.opacity, 1.0, "Showable should be at end of animation after showNow");
169+ }
170+
171+ // Test the lazy showNow mechanism while waiting for the created flag.
172+ function test_showNow_when_not_created() {
173+ init_test();
174+
175+ show1.opacity = 0.2;
176+ show1.created = false;
177+
178+ show1.showNow();
179+ compare(show1.shown, false, "Showable should not showNow when created == false");
180+ show1.created = true;
181+ compare(show1.shown, true, "Showable should automatically show when created changes to true if attempted to showNow before.");
182+ compare(show1.showAnimation.running, false, "Showable should be done running after delayed showNow");
183+ compare(show1.opacity, 1.0, "Showable should be at end of animation after delayed showNow");
184+ }
158185 }
159186}