browser_toolbox_broken_xml_frame.js (838B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 "use strict"; 4 5 const TEST_URI = URL_ROOT_COM_SSL + "doc_broken_xml_frame.html"; 6 7 add_task(async function testOpenToolboxOnBrokenXMLFrame() { 8 await addTab(TEST_URI); 9 const tab = gBrowser.selectedTab; 10 11 info("Open the toolbox on page with an iframe containing a broken XML doc"); 12 const toolbox = await gDevTools.showToolboxForTab(tab, { 13 toolId: "webconsole", 14 }); 15 16 info("Check that the console opened and has the message from the page"); 17 const { hud } = toolbox.getPanel("webconsole"); 18 await waitFor(() => 19 Array.from(hud.ui.window.document.querySelectorAll(".message-body")).some( 20 el => el.innerText.includes("foo after iframe") 21 ) 22 ); 23 ok(true, "The console opened with the expected content"); 24 });