@@ -1478,5 +1478,38 @@ Rectangle {
14781478
14791479 launcher.available = true;
14801480 }
1481+
1482+ function dragDrawerIntoView() {
1483+ var startX = launcher.dragAreaWidth/2;
1484+ var startY = launcher.height/2;
1485+ touchFlick(launcher,
1486+ startX, startY,
1487+ startX+units.gu(35), startY);
1488+
1489+ var drawer = findChild(launcher, "drawer");
1490+ verify(!!drawer);
1491+
1492+ // wait until it gets fully extended
1493+ // a tryCompare doesn't work since
1494+ // compare(-0.000005917593600024418, 0);
1495+ // is true and in this case we want exactly 0 or will have pain later on
1496+ tryCompareFunction( function(){ return drawer.x === 0; }, true );
1497+ tryCompare(launcher, "state", "drawer");
1498+ tryCompare(launcher, "drawerShown", true);
1499+
1500+ return drawer;
1501+ }
1502+
1503+ function test_directSearch() {
1504+ var drawer = dragDrawerIntoView();
1505+ verify(!!drawer);
1506+
1507+ tryCompare(drawer, "focus", true);
1508+
1509+ var searchField = findChild(drawer, "searchField");
1510+ verify(searchField);
1511+ typeString("cam");
1512+ tryCompare(searchField, "displayText", "cam");
1513+ }
14811514 }
14821515}