diff --git a/browser/base/content/test/general/browser.ini b/browser/base/content/test/general/browser.ini
index c1ac21a487ff..07ab48415753 100644
--- a/browser/base/content/test/general/browser.ini
+++ b/browser/base/content/test/general/browser.ini
@@ -32,6 +32,8 @@ support-files =
ctxmenu-image.png
discovery.html
download_page.html
+ download_page_1.txt
+ download_page_2.txt
dummy_page.html
feed_tab.html
file_generic_favicon.ico
diff --git a/browser/base/content/test/general/browser_bug575561.js b/browser/base/content/test/general/browser_bug575561.js
index a769d1a2bd50..9837aa3baded 100644
--- a/browser/base/content/test/general/browser_bug575561.js
+++ b/browser/base/content/test/general/browser_bug575561.js
@@ -5,6 +5,11 @@ const TEST_URL = "http://example.com/browser/browser/base/content/test/general/a
add_task(async function() {
SimpleTest.requestCompleteLog();
+ // allow top level data: URI navigations, otherwise clicking data: link fails
+ await SpecialPowers.pushPrefEnv({
+ "set": [["security.data_uri.block_toplevel_data_uri_navigations", false]]
+ });
+
// Pinned: Link to the same domain should not open a new tab
// Tests link to http://example.com/browser/browser/base/content/test/general/dummy_page.html
await testLink(0, true, false);
diff --git a/browser/base/content/test/general/browser_bug734076.js b/browser/base/content/test/general/browser_bug734076.js
index 45ad6a8dffe2..fdfa13db2796 100644
--- a/browser/base/content/test/general/browser_bug734076.js
+++ b/browser/base/content/test/general/browser_bug734076.js
@@ -2,6 +2,13 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */
add_task(async function() {
+
+ // allow top level data: URI navigations, otherwise loading data: URIs
+ // in toplevel windows fail.
+ await SpecialPowers.pushPrefEnv({
+ "set": [["security.data_uri.block_toplevel_data_uri_navigations", false]]
+ });
+
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, null, false);
let browser = tab.linkedBrowser;
diff --git a/browser/base/content/test/general/browser_fullscreen-window-open.js b/browser/base/content/test/general/browser_fullscreen-window-open.js
index 10457a698849..3896dc21bf70 100644
--- a/browser/base/content/test/general/browser_fullscreen-window-open.js
+++ b/browser/base/content/test/general/browser_fullscreen-window-open.js
@@ -6,6 +6,7 @@ var Cc = Components.classes;
var Ci = Components.interfaces;
const PREF_DISABLE_OPEN_NEW_WINDOW = "browser.link.open_newwindow.disabled_in_fullscreen";
+const PREF_BLOCK_TOPLEVEL_DATA = "security.data_uri.block_toplevel_data_uri_navigations";
const isOSX = (Services.appinfo.OS === "Darwin");
const TEST_FILE = "file_fullscreen-window-open.html";
@@ -19,6 +20,7 @@ async function test() {
waitForExplicitFinish();
Services.prefs.setBoolPref(PREF_DISABLE_OPEN_NEW_WINDOW, true);
+ Services.prefs.setBoolPref(PREF_BLOCK_TOPLEVEL_DATA, false);
newWin = await BrowserTestUtils.openNewBrowserWindow();
newBrowser = newWin.gBrowser;
@@ -37,6 +39,7 @@ registerCleanupFunction(async function() {
await BrowserTestUtils.closeWindow(newWin);
Services.prefs.clearUserPref(PREF_DISABLE_OPEN_NEW_WINDOW);
+ Services.prefs.clearUserPref(PREF_BLOCK_TOPLEVEL_DATA);
});
var gTests = [
diff --git a/browser/base/content/test/general/download_page.html b/browser/base/content/test/general/download_page.html
index 3093ffa2e2cb..a7664e1b2599 100644
--- a/browser/base/content/test/general/download_page.html
+++ b/browser/base/content/test/general/download_page.html
@@ -11,13 +11,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=676619
Bug 676619