зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1755311 - Stop relying on "security.csp.enable" for tests in devtools/client/framework/tests r=devtools-reviewers,freddyb,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D138770
This commit is contained in:
Родитель
ba777d963d
Коммит
ca4179a2ff
|
@ -34,7 +34,9 @@ support-files =
|
|||
doc_cached-resource.html
|
||||
doc_cached-resource_iframe.html
|
||||
doc_empty-tab-01.html
|
||||
doc_lazy_tool.html
|
||||
doc_reload.html
|
||||
doc_textbox_tool.html
|
||||
head.js
|
||||
helper_disable_cache.js
|
||||
helper_enable_devtools_popup.js
|
||||
|
|
|
@ -34,15 +34,6 @@ function isPanelReady(toolbox, toolId) {
|
|||
* returning. See Bug 1543907.
|
||||
*/
|
||||
add_task(async function automaticallyBindTexbox() {
|
||||
// We have to disable CSP for this test otherwise the CSP of
|
||||
// about:devtools-toolbox will block the data: url.
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["security.csp.enable", false],
|
||||
["dom.security.skip_about_page_has_csp_assert", true],
|
||||
],
|
||||
});
|
||||
|
||||
info(
|
||||
"Registering a tool with an input field and making sure the context menu works"
|
||||
);
|
||||
|
@ -50,7 +41,7 @@ add_task(async function automaticallyBindTexbox() {
|
|||
gDevTools.registerTool({
|
||||
id: lazyToolId,
|
||||
isTargetSupported: () => true,
|
||||
url: `data:text/html;charset=utf8,Lazy tool`,
|
||||
url: CHROME_URL_ROOT + "doc_lazy_tool.html",
|
||||
label: "Lazy",
|
||||
build: function(iframeWindow, toolbox) {
|
||||
this.panel = new LazyDevToolsPanel(iframeWindow, toolbox);
|
||||
|
|
|
@ -15,15 +15,6 @@ registerCleanupFunction(() => {
|
|||
});
|
||||
|
||||
add_task(async function checkMenuEntryStates() {
|
||||
// We have to disable CSP for this test otherwise the CSP of
|
||||
// about:devtools-toolbox will block the data: url.
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["security.csp.enable", false],
|
||||
["dom.security.skip_about_page_has_csp_assert", true],
|
||||
],
|
||||
});
|
||||
|
||||
info("Checking the state of edit menuitems with an empty clipboard");
|
||||
const toolbox = await openNewTabAndToolbox(URL, "inspector");
|
||||
|
||||
|
@ -72,23 +63,13 @@ add_task(async function checkMenuEntryStates() {
|
|||
});
|
||||
|
||||
add_task(async function automaticallyBindTexbox() {
|
||||
// We have to disable CSP for this test otherwise the CSP of
|
||||
// about:devtools-toolbox will block the data: url.
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["security.csp.enable", false],
|
||||
["dom.security.skip_about_page_has_csp_assert", true],
|
||||
],
|
||||
});
|
||||
|
||||
info(
|
||||
"Registering a tool with an input field and making sure the context menu works"
|
||||
);
|
||||
gDevTools.registerTool({
|
||||
id: textboxToolId,
|
||||
isTargetSupported: () => true,
|
||||
url: `data:text/html;charset=utf8,<input /><input type='text' />
|
||||
<input type='search' /><textarea></textarea><input type='radio' />`,
|
||||
url: CHROME_URL_ROOT + "doc_textbox_tool.html",
|
||||
label: "Context menu works without tool intervention",
|
||||
build: function(iframeWindow, toolbox) {
|
||||
this.panel = createTestPanel(iframeWindow, toolbox);
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
Lazy tool
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<input />
|
||||
<input type='text' />
|
||||
<input type='search' />
|
||||
<textarea></textarea>
|
||||
<input type='radio' />
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче