/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; // Tests for inspecting iframes and frames in browser context menu const IFRAME_URI = `data:text/html;charset=utf-8,${encodeURI( `
div in the iframe
` )}`; const TEST_IFRAME_DOC_URI = `data:text/html;charset=utf-8,${encodeURI(`
Salution in top document
`)}`; // acts as the body element, so we can't use them in a document with other elements // and have to set a dedicated document so we can test them. const SAME_ORIGIN_FRAME_URI = `https://example.com/document-builder.sjs?html=

h2 in the same origin frame

`; const REMOTE_ORIGIN_FRAME_URI = `https://example.org/document-builder.sjs?html=

h3 in the remote frame

`; const TEST_FRAME_DOC_URI = `https://example.com/document-builder.sjs?html=${encodeURI(` `)}`; add_task(async function () { await pushPref("devtools.command-button-frames.enabled", true); await addTab(TEST_IFRAME_DOC_URI); info( "Test inspecting element in