@@ -163,6 +163,16 @@ IndicatorTest {
163 return indicatorItem;
163 return indicatorItem;
166+ function pullDownIndicatorsMenu() {
167+ var showDragHandle = findChild(panel, "showDragHandle");
168+ touchFlick(showDragHandle,
169+ showDragHandle.width / 2,
170+ showDragHandle.height / 2,
171+ showDragHandle.width / 2,
172+ showDragHandle.height / 2 + (showDragHandle.autoCompleteDragThreshold * 1.1));
173+ tryCompare(panel.indicators, "fullyOpened", true);
166 function test_drag_show_data() {
176 function test_drag_show_data() {
168 { tag: "pinned", fullscreen: false, call: null,
178 { tag: "pinned", fullscreen: false, call: null,
@@ -330,5 +340,47 @@ IndicatorTest {
331 compare(backgroundPressedSpy.count, 0);
341 compare(backgroundPressedSpy.count, 0);
344+ function test_darkenedAreaEatsAllEvents() {
346+ // The center of the area not covered by the indicators menu
347+ // Ie, the visible darkened area behind the menu
348+ var touchPosX = (panel.width - panel.indicators.width) / 2
349+ var touchPosY = panel.indicators.minimizedPanelHeight +
350+ ((panel.height - panel.indicators.minimizedPanelHeight) / 2)
352+ // input goes through while the indicators menu is closed
353+ tryCompare(panel.indicators, "fullyClosed", true);
354+ compare(backgroundPressedSpy.count, 0);
355+ tap(panel, touchPosX, touchPosY);
356+ compare(backgroundPressedSpy.count, 2);
358+ pullDownIndicatorsMenu();
360+ // Darkened area eats input when the indicators menu is fully opened
361+ tap(panel, touchPosX, touchPosY);
362+ compare(backgroundPressedSpy.count, 2);
363+ backgroundPressedSpy.clear();
365+ // And should continue to eat inpunt until the indicators menu is fully closed
367+ while (!panel.indicators.fullyClosed) {
368+ tap(panel, touchPosX, touchPosY);
370+ // it could have got fully closed during the tap
371+ // so we have to double check here
372+ if (!panel.indicators.fullyClosed) {
373+ compare(backgroundPressedSpy.count, 0);
376+ // let the animation go a bit further
380+ // Now that's fully closed, input should go through again
381+ backgroundPressedSpy.clear();
382+ tap(panel, touchPosX, touchPosY);
383+ compare(backgroundPressedSpy.count, 2);