browser_webconsole_execution_scope.js (902B)
1 /* Any copyright is dedicated to the Public Domain. 2 * http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 // Tests that commands run by the user are executed in content space. 5 6 "use strict"; 7 8 const TEST_URI = 9 "http://example.com/browser/devtools/client/webconsole/" + 10 "test/browser/test-console.html"; 11 12 add_task(async function () { 13 const hud = await openNewTabAndConsole(TEST_URI); 14 await clearOutput(hud); 15 16 const onInputMessage = waitForMessageByType( 17 hud, 18 "window.location.href;", 19 ".command" 20 ); 21 const onEvaluationResultMessage = waitForMessageByType( 22 hud, 23 TEST_URI, 24 ".result" 25 ); 26 execute(hud, "window.location.href;"); 27 28 let message = await onInputMessage; 29 ok(message, "Input message is displayed with the expected class"); 30 31 message = await onEvaluationResultMessage; 32 ok(message, "EvaluationResult message is displayed with the expected class"); 33 });