@@ -1,5 +1,5 @@
2− * Copyright 2013-2014 Canonical Ltd.
2+ * Copyright 2013-2015 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -41,7 +41,12 @@ IndicatorTest {
41 Layout.fillHeight: true
41 Layout.fillHeight: true
43 id: itemArea
43 id: itemArea
44− color: "blue"
44+ color: backgroundMouseArea.pressed ? "red" : "blue"
47+ id: backgroundMouseArea
@@ -128,6 +133,12 @@ IndicatorTest {
128 name: "Panel"
133 name: "Panel"
129 when: windowShown
134 when: windowShown
137+ id: backgroundPressedSpy
138+ target: backgroundMouseArea
139+ signalName: "pressedChanged"
131 function init() {
142 function init() {
132 panel.fullscreenMode = false;
143 panel.fullscreenMode = false;
133 callManager.foregroundCall = null;
144 callManager.foregroundCall = null;
@@ -140,6 +151,9 @@ IndicatorTest {
140 // (switches between normal and fullscreen modes are animated)
151 // (switches between normal and fullscreen modes are animated)
141 var indicatorArea = findChild(panel, "indicatorArea");
152 var indicatorArea = findChild(panel, "indicatorArea");
142 tryCompare(indicatorArea, "y", 0);
153 tryCompare(indicatorArea, "y", 0);
155+ backgroundPressedSpy.clear();
156+ compare(backgroundPressedSpy.valid, true);
145 function get_indicator_item(index) {
159 function get_indicator_item(index) {
@@ -299,5 +313,22 @@ IndicatorTest {
300 touchRelease(panel, mappedPosition.x, panel.minimizedPanelHeight / 2);
314 touchRelease(panel, mappedPosition.x, panel.minimizedPanelHeight / 2);
317+ /* Checks that no input reaches items behind the indicator bar.
318+ Ie., the indicator bar should eat all input events that hit it.
320+ function test_indicatorBarEatsAllEvents() {
321+ // Perform several taps throughout the length of the indicator bar to ensure
322+ // that it doesn't have a "weak spot" from where taps pass through.
324+ var stepLength = (panel.width / (numTaps + 1));
325+ var tapY = panel.indicators.minimizedPanelHeight / 2;
326+ for (var i = 1; i <= numTaps; ++i) {
327+ tap(panel, stepLength * i, tapY);
328+ tryCompare(panel.indicators, "fullyClosed", true);
331+ compare(backgroundPressedSpy.count, 0);