Make waitForRendering not crash if no item is given
commit6987dad4db24ec868a8c2a4dc20ede48d1fbb177
authorAlbert Astals <albert.astals@canonical.com>
dateWed 7 Jan 2015, 16:11 (12 years ago)
parentab98493
tests/utils/modules/Unity/Test/UnityTestCase.qml+9
@@ -381,4 +381,13 @@ TestCase {
381381 }
382382 }
383383 }
384+
385+ function waitForRendering(item, timeout) {
386+ if (timeout === undefined)
387+ timeout = 5000
388+ if (!item)
389+ qtest_fail("No item given to waitForRendering", 1)
390+ return qtest_results.waitForRendering(item, timeout)
391+ }
392+
384393}