@@ -517,5 +517,53 @@ Item {
517 tryCompare(dashTempScopeItem, "x", dash.width);
517 tryCompare(dashTempScopeItem, "x", dash.width);
518 tryCompare(dashTempScopeItem, "visible", false);
518 tryCompare(dashTempScopeItem, "visible", false);
521+ function test_UriDispatcher()
523+ var dashContentList = findChild(dash, "dashContentList");
525+ UriHandler.opened("scopes://clickscope");
526+ tryCompare(dashContentList, "currentIndex", 1);
528+ // Show the manage dash
529+ touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));
530+ var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController");
531+ tryCompare(bottomEdgeController, "progress", 1);
533+ // UriHandler changes to a scope and closes the manage scopes
534+ UriHandler.opened("scopes://MockScope1");
535+ tryCompare(dashContentList, "currentIndex", 0);
536+ tryCompare(bottomEdgeController, "progress", 0);
539+ var scopeLoader0 = findChild(dashContent, "scopeLoader0");
540+ var dashCategory0 = findChild(scopeLoader0, "dashCategory0");
541+ var delegate0 = findChild(dashCategory0, "delegate0");
542+ mouseClick(delegate0);
543+ tryCompare(dashContent, "subPageShown", true)
545+ // UriHandler changes to a scope and closes the manage scopes
546+ UriHandler.opened("scopes://clickscope");
547+ tryCompare(dashContentList, "currentIndex", 1);
548+ tryCompare(dashContent, "subPageShown", false);
550+ // Go to a temp scope
551+ touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));
552+ var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController");
553+ tryCompare(bottomEdgeController, "progress", 1);
554+ var nonfavScopesListCategory = findChild(dash, "scopesListCategoryother");
555+ var nonfavScopesListCategoryList = findChild(nonfavScopesListCategory, "scopesListCategoryInnerList");
556+ tryCompare(nonfavScopesListCategoryList, "currentIndex", 0);
557+ mouseClick(nonfavScopesListCategoryList.currentItem);
558+ var dashTempScopeItem = findChild(dash, "dashTempScopeItem");
559+ tryCompare(dashTempScopeItem, "x", 0);
560+ tryCompare(dashTempScopeItem, "visible", true);
562+ // UriHandler changes to a scope and closes the temp scope
563+ UriHandler.opened("scopes://MockScope1");
564+ tryCompare(dashContentList, "currentIndex", 0);
565+ tryCompare(dashTempScopeItem, "x", dashTempScopeItem.width);
566+ tryCompare(dashTempScopeItem, "visible", false);