blob: 4b654494bb7b624c9b0d563f00f89c65dc2a5e39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
// Test that the autocomplete popup closes on switching tabs. See bug 900448.
"use strict";
const TEST_URI =
"data:text/html;charset=utf-8,<!DOCTYPE html><p>bug 900448 - autocomplete " +
"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");
});
|