on xenial help sign in
Shell test: mock applicationArguments context property
38c37fbDaniel d'Andrada
tests/qmltests/tst_Shell.qml+24−2
@@ -23,8 +23,30 @@ import Unity.Test 0.1 as UT
23
23
24import "../.."
24import "../.."
25
25
26+Item {
27+ width: shell.width
28+ height: shell.height
29+
30+ QtObject {
31+ id: applicationArguments
32+
33+ function hasGeometry() {
34+ return false;
35+ }
36+
37+ function width() {
38+ return 0;
39+ }
40+
41+ function height() {
42+ return 0;
43+ }
44+ }
45+
26−Shell {
46+ Shell {
27− id: shell
47+ id: shell
48+ }
49+
28 UT.UnityTestCase {
50 UT.UnityTestCase {
29 name: "Shell"
51 name: "Shell"
30 when: windowShown
52 when: windowShown