browser/components/search/test/browser_405664.js

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 function test() {
     2   var searchBar = BrowserSearch.searchBar;
     3   ok(searchBar, "got search bar");
     5   searchBar.focus();
     7   var pbo = searchBar._popup.popupBoxObject;
     8   ok(pbo, "popup is nsIPopupBoxObject");
    10   EventUtils.synthesizeKey("VK_UP", { altKey: true });
    11   is(pbo.popupState, "showing", "popup is opening after Alt+Up");
    13   EventUtils.synthesizeKey("VK_ESCAPE", {});
    14   is(pbo.popupState, "closed", "popup is closed after ESC");
    16   EventUtils.synthesizeKey("VK_DOWN", { altKey: true });
    17   is(pbo.popupState, "showing", "popup is opening after Alt+Down");
    19   EventUtils.synthesizeKey("VK_ESCAPE", {});
    20   is(pbo.popupState, "closed", "popup is closed after ESC 2");
    22   if (!/Mac/.test(navigator.platform)) {
    23     EventUtils.synthesizeKey("VK_F4", {});
    24     is(pbo.popupState, "showing", "popup is opening after F4");
    26     EventUtils.synthesizeKey("VK_ESCAPE", {});
    27     is(pbo.popupState, "closed", "popup is closed after ESC 3");
    28   }
    29 }

mercurial