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.
michael@0 | 1 | /* Any copyright is dedicated to the Public Domain. |
michael@0 | 2 | * http://creativecommons.org/publicdomain/zero/1.0/ |
michael@0 | 3 | */ |
michael@0 | 4 | |
michael@0 | 5 | // Tests that the discovery view is the default |
michael@0 | 6 | |
michael@0 | 7 | var gCategoryUtilities; |
michael@0 | 8 | |
michael@0 | 9 | function test() { |
michael@0 | 10 | waitForExplicitFinish(); |
michael@0 | 11 | |
michael@0 | 12 | open_manager(null, function(aWindow) { |
michael@0 | 13 | waitForFocus(function() { |
michael@0 | 14 | // The last view is cached except when it is the search view so switch to |
michael@0 | 15 | // that and reopen to ensure we see the default view |
michael@0 | 16 | var searchBox = aWindow.document.getElementById("header-search"); |
michael@0 | 17 | searchBox.value = "bar"; |
michael@0 | 18 | |
michael@0 | 19 | EventUtils.synthesizeMouseAtCenter(searchBox, { }, aWindow); |
michael@0 | 20 | EventUtils.synthesizeKey("VK_RETURN", { }, aWindow); |
michael@0 | 21 | |
michael@0 | 22 | wait_for_view_load(aWindow, function() { |
michael@0 | 23 | close_manager(aWindow, function() { |
michael@0 | 24 | open_manager(null, function(aWindow) { |
michael@0 | 25 | gCategoryUtilities = new CategoryUtilities(aWindow); |
michael@0 | 26 | is(gCategoryUtilities.selectedCategory, "discover", "Should show the discovery pane by default"); |
michael@0 | 27 | |
michael@0 | 28 | close_manager(aWindow, finish); |
michael@0 | 29 | }); |
michael@0 | 30 | }); |
michael@0 | 31 | }); |
michael@0 | 32 | }, aWindow); |
michael@0 | 33 | }); |
michael@0 | 34 | } |