browser_jsterm_null_undefined.js (633B)
1 /* Any copyright is dedicated to the Public Domain. 2 * http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 const TEST_URI = 7 "data:text/html,<!DOCTYPE html>Test evaluating null and undefined"; 8 9 add_task(async function () { 10 const hud = await openNewTabAndConsole(TEST_URI); 11 12 // Check that an evaluated null produces "null". See Bug 650780. 13 let message = await executeAndWaitForResultMessage(hud, "null", "null"); 14 ok(message, "`null` returned the expected value"); 15 16 message = await executeAndWaitForResultMessage(hud, "undefined", "undefined"); 17 ok(message, "`undefined` returned the expected value"); 18 });