Bug 1420296 - Test for same-origin file requests r=rpl

Differential Revision: https://phabricator.services.mozilla.com/D54543

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Rob Wu 2020-01-17 09:02:51 +00:00
Родитель 9336e8143b
Коммит cfb99d1f4b
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -63,6 +63,13 @@ add_task(async function file_access_from_extension_page_not_allowed() {
"block request to file from background page despite file permission" "block request to file from background page despite file permission"
); );
// Regression test for bug 1420296 .
await browser.test.assertRejects(
fetch(FILE_DUMMY_URL, { mode: "same-origin" }),
/NetworkError when attempting to fetch resource/,
"block request to file from background page despite 'same-origin' mode"
);
browser.test.sendMessage("done"); browser.test.sendMessage("done");
}, },
}); });