toolkit/mozapps/extensions/test/browser/browser_bug610764.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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 }

mercurial