@@ -1,5 +1,5 @@
11/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014-2015 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtTest 1.0
19−import Unity.Test 0.1 as UT
19+import Unity.Test 0.1
2020import ".."
2121import "../../../qml/Stages"
2222import Ubuntu.Components 0.1
@@ -32,6 +32,8 @@ Rectangle {
3232 id: surfaceContainerComponent
3333 SurfaceContainer {
3434 anchors.fill: parent
35+ orientation: Qt.PortraitOrientation
36+ interactive: interactiveCheckbox.checked
3537 }
3638 }
3739 Loader {
@@ -85,6 +87,11 @@ Rectangle {
8587 CheckBox {id: fullscreenCheckbox; checked: true; }
8688 Label { text: "fullscreen" }
8789 }
90+ Row {
91+ anchors { left: parent.left; right: parent.right }
92+ CheckBox {id: interactiveCheckbox; checked: true; }
93+ Label { text: "interactive" }
94+ }
8895 }
8996 }
9097
@@ -94,7 +101,7 @@ Rectangle {
94101 signalName: "surfaceDestroyed"
95102 }
96103
97− UT.UnityTestCase {
104+ UnityTestCase {
98105 id: testCase
99106 name: "SurfaceContainer"
100107 when: windowShown
@@ -110,6 +117,8 @@ Rectangle {
110117
111118 tryCompare(surfaceContainerLoader.item, "surface", null);
112119 surfaceSpy.clear();
120+
121+ interactiveCheckbox.checked = true;
113122 }
114123
115124 /*
@@ -145,14 +154,13 @@ Rectangle {
145154 surfaceContainer.surface.touchPressCount = 0;
146155 surfaceContainer.surface.touchReleaseCount = 0;
147156
148− surfaceContainer.interactive = true;
149157 tap(surfaceContainer, surfaceContainer.width / 2, surfaceContainer.height / 2);
150158
151159 // surface got touches as the surfaceContainer is interactive
152160 compare(surfaceContainer.surface.touchPressCount, 1)
153161 compare(surfaceContainer.surface.touchReleaseCount, 1);
154162
155− surfaceContainer.interactive = false;
163+ interactiveCheckbox.checked = false;
156164 tap(surfaceContainer, surfaceContainer.width / 2, surfaceContainer.height / 2);
157165
158166 // surface shouldn't get the touches from the second tap as the surfaceContainer