Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* Any copyright is dedicated to the Public Domain.
2 * http://creativecommons.org/publicdomain/zero/1.0/
3 */
5 // Tests that the discovery view is the default
7 var gCategoryUtilities;
9 function test() {
10 waitForExplicitFinish();
12 open_manager(null, function(aWindow) {
13 waitForFocus(function() {
14 // The last view is cached except when it is the search view so switch to
15 // that and reopen to ensure we see the default view
16 var searchBox = aWindow.document.getElementById("header-search");
17 searchBox.value = "bar";
19 EventUtils.synthesizeMouseAtCenter(searchBox, { }, aWindow);
20 EventUtils.synthesizeKey("VK_RETURN", { }, aWindow);
22 wait_for_view_load(aWindow, function() {
23 close_manager(aWindow, function() {
24 open_manager(null, function(aWindow) {
25 gCategoryUtilities = new CategoryUtilities(aWindow);
26 is(gCategoryUtilities.selectedCategory, "discover", "Should show the discovery pane by default");
28 close_manager(aWindow, finish);
29 });
30 });
31 });
32 }, aWindow);
33 });
34 }