@@ -390,5 +390,57 @@ IndicatorTest {
390390 tap(panel, touchPosX, touchPosY);
391391 compare(backgroundPressedSpy.count, 2);
392392 }
393+
394+ /*
395+ Regression test for https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1439318
396+ When the panel is in fullscreen mode and the user taps near the top edge,
397+ the panel should take no action and the tap should reach the item behind the
398+ panel.
399+ */
400+ function test_tapNearTopEdgeWithPanelInFullscreenMode() {
401+ var indicatorArea = findChild(panel, "indicatorArea");
402+ verify(indicatorArea);
403+ var panelPriv = findInvisibleChild(panel, "panelPriv");
404+ verify(panelPriv);
405+
406+ panel.fullscreenMode = true;
407+ // wait until if finishes hiding itself
408+ tryCompare(indicatorArea, "y", -panelPriv.indicatorHeight);
409+
410+ compare(panel.indicators.shown, false);
411+ verify(panel.indicators.fullyClosed);
412+
413+ // tap near the very top of the screen
414+ tap(itemArea, itemArea.width / 2, 2);
415+
416+ // the tap should have reached the item behind the panel
417+ compare(backgroundPressedSpy.count, 2);
418+
419+ // give it a couple of event loop iterations for any animations etc to kick in
420+ wait(50);
421+
422+ compare(panel.indicators.shown, false);
423+ verify(panel.indicators.fullyClosed);
424+ }
425+
426+ function test_openAndClosePanelWithMouseClicks() {
427+ compare(panel.indicators.shown, false);
428+ verify(panel.indicators.fullyClosed);
429+
430+ mouseClick(panel.indicators,
431+ panel.indicators.width / 2,
432+ panel.indicators.minimizedPanelHeight / 2);
433+
434+ compare(panel.indicators.shown, true);
435+ tryCompare(panel.indicators, "fullyOpened", true);
436+
437+ var handle = findChild(panel.indicators, "handle");
438+ verify(handle);
439+
440+ mouseClick(handle);
441+
442+ compare(panel.indicators.shown, false);
443+ tryCompare(panel.indicators, "fullyClosed", true);
444+ }
393445 }
394446}