Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
/* Any copyright is dedicated to the Public Domain.
"use strict";
const TEST_URI = `data:text/html;charset=utf-8,
<!DOCTYPE html>
<head>
<script>
window.foo = [1,2,3];
</script>
</head>
add_task(async function () {
const hud = await openNewTabAndConsole(TEST_URI);
const { autocompletePopup: popup } = hud.jsterm;
const onPopUpOpen = popup.once("popup-opened");
info("wait for popup to show");
setInputValue(hud, "foo");
EventUtils.sendString(".");
await onPopUpOpen;
ok(
!hasPopupLabel(popup, "0"),
"Completing on an array doesn't show numbers."
);
info("press Escape to close the popup");
const onPopupClose = popup.once("popup-closed");
EventUtils.synthesizeKey("KEY_Escape");
await onPopupClose;
});