@@ -495,6 +495,26 @@ Item {
495495 compare(peExtraPanel.visible, true);
496496 }
497497
498+ function test_clearSearchWithNavigationClosed() {
499+ var dashContentList = findChild(dashContent, "dashContentList");
500+ var searchButton = findChild(dashContentList.currentItem, "search_header_button");
501+ var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
502+ var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
503+
504+ compare(peExtraPanel.visible, false);
505+ mouseClick(searchButton);
506+ tryCompare(peExtraPanel, "visible", true);
507+
508+ typeString("A");
509+ compare(peExtraPanel.visible, false);
510+
511+ var clearIcon = findChild(searchTextField, "clearIcon");
512+ mouseClick(clearIcon);
513+
514+ expectFail("", "Extra panel should not be visible after clearing search if it was not visible before");
515+ tryCompare(peExtraPanel, "visible", true);
516+ }
517+
498518 function test_searchHint() {
499519 var dashContentList = findChild(dashContent, "dashContentList");
500520 verify(dashContentList !== null);