Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
/* Any copyright is dedicated to the Public Domain.
"use strict";
const TEST_URI =
"popup closes on tab switch";
const TEST_URI_NAVIGATE =
"data:text/html;charset=utf-8,<!DOCTYPE html><p>testing autocomplete closes";
add_task(async function () {
const hud = await openNewTabAndConsole(TEST_URI);
const popup = hud.jsterm.autocompletePopup;
const popupShown = once(popup, "popup-opened");
setInputValue(hud, "sc");
EventUtils.sendString("r");
await popupShown;
await addTab(TEST_URI_NAVIGATE);
ok(!popup.isOpen, "Popup closes on tab switch");
});