Bug 1378377 Part 3: Make sure domains whitelisted for file:// URI use run in file contest process. r=Gijs

This commit is contained in:
Bob Owen 2017-07-19 09:37:25 +01:00
Родитель 8cd9bf78f8
Коммит 9f346cf6f0
2 изменённых файлов: 29 добавлений и 0 удалений

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

@ -13,6 +13,8 @@ skip-if = !e10s # Tab spinner is e10s only.
[browser_tabSwitchPrintPreview.js]
skip-if = os == 'mac'
[browser_navigatePinnedTab.js]
[browser_new_file_whitelisted_http_tab.js]
skip-if = !e10s # Test only relevant for e10s.
[browser_new_web_tab_in_file_process_pref.js]
skip-if = !e10s # Pref and test only relevant for e10s.
[browser_opened_file_tab_navigated_to_web.js]

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

@ -0,0 +1,27 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
const TEST_HTTP = "http://example.org/";
// Test for bug 1378377.
add_task(async function() {
// Set prefs to ensure file content process.
await SpecialPowers.pushPrefEnv(
{set: [["browser.tabs.remote.separateFileUriProcess", true]]});
await BrowserTestUtils.withNewTab(TEST_HTTP, async function(fileBrowser) {
is(fileBrowser.remoteType, E10SUtils.WEB_REMOTE_TYPE,
"Check that tab normally has web remote type.");
});
// Set prefs to whitelist TEST_HTTP for file:// URI use.
await SpecialPowers.pushPrefEnv(
{set: [["capability.policy.policynames", "allowFileURI"],
["capability.policy.allowFileURI.sites", TEST_HTTP],
["capability.policy.allowFileURI.checkloaduri.enabled", "allAccess"]]});
await BrowserTestUtils.withNewTab(TEST_HTTP, async function(fileBrowser) {
is(fileBrowser.remoteType, E10SUtils.FILE_REMOTE_TYPE,
"Check that tab now has file remote type.");
});
});