browser_jsterm_autocomplete_extraneous_closing_brackets.js (660B)
1 /* Any copyright is dedicated to the Public Domain. 2 * http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 // Tests that, when the user types an extraneous closing bracket, no error 5 // appears. See Bug 592442. 6 7 "use strict"; 8 9 const TEST_URI = 10 "data:text/html;charset=utf-8,<!DOCTYPE html>test for bug 592442"; 11 12 add_task(async function () { 13 const hud = await openNewTabAndConsole(TEST_URI); 14 15 try { 16 await setInputValueForAutocompletion(hud, "document.getElementById)"); 17 ok(true, "no error was thrown when an extraneous bracket was inserted"); 18 } catch (ex) { 19 ok(false, "an error was thrown when an extraneous bracket was inserted"); 20 } 21 });