summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/palemoon/app/application.ini50
-rw-r--r--application/palemoon/app/profile/palemoon.js5
-rw-r--r--application/palemoon/base/content/browser-fullScreen.js102
-rw-r--r--application/palemoon/base/content/browser.css12
-rw-r--r--application/palemoon/base/content/browser.js2
-rw-r--r--application/palemoon/base/content/browser.xul12
-rw-r--r--application/palemoon/base/content/pageinfo/pageInfo.xul29
-rw-r--r--application/palemoon/base/content/pageinfo/permissions.js14
-rw-r--r--application/palemoon/components/preferences/aboutPermissions.js35
-rw-r--r--application/palemoon/components/preferences/aboutPermissions.xul58
-rw-r--r--application/palemoon/locales/en-US/chrome/browser/browser.dtd3
-rw-r--r--application/palemoon/locales/en-US/chrome/browser/browser.properties2
-rw-r--r--application/palemoon/locales/en-US/chrome/browser/pageInfo.dtd2
-rw-r--r--application/palemoon/locales/en-US/chrome/browser/preferences/aboutPermissions.dtd4
-rw-r--r--application/palemoon/themes/linux/browser.css9
-rw-r--r--application/palemoon/themes/linux/preferences/aboutPermissions.css6
-rw-r--r--application/palemoon/themes/osx/browser.css9
-rw-r--r--application/palemoon/themes/osx/preferences/aboutPermissions.css6
-rw-r--r--application/palemoon/themes/windows/browser.css9
-rw-r--r--application/palemoon/themes/windows/preferences/aboutPermissions.css6
-rw-r--r--browser/app/application.ini50
-rw-r--r--browser/branding/unofficial/basilisk.VisualElementsManifest.xml (renamed from browser/branding/unofficial/serpent.VisualElementsManifest.xml)0
-rw-r--r--build/application.ini66
-rw-r--r--build/moz.build22
-rw-r--r--devtools/client/inspector/markup/test/browser.ini2
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_update-on-navigtion.js5
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_update-on-navigtion_1.html1
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_update-on-navigtion_2.html1
-rw-r--r--docshell/base/crashtests/914521.html10
-rw-r--r--docshell/test/chrome/test_bug364461.xul10
-rw-r--r--docshell/test/file_bug598895_1.html1
-rw-r--r--docshell/test/file_bug598895_2.html1
-rw-r--r--docshell/test/file_bug637644_1.html1
-rw-r--r--docshell/test/file_bug637644_2.html1
-rw-r--r--docshell/test/mochitest.ini4
-rw-r--r--docshell/test/navigation/NavigationUtils.js20
-rw-r--r--docshell/test/navigation/file_scrollRestoration.html4
-rw-r--r--docshell/test/navigation/mochitest.ini2
-rw-r--r--docshell/test/navigation/navigation_target_popup_url.html1
-rw-r--r--docshell/test/navigation/navigation_target_url.html1
-rw-r--r--docshell/test/navigation/open.html2
-rw-r--r--docshell/test/navigation/test_triggeringprincipal_window_open.html28
-rw-r--r--docshell/test/test_bug598895.html5
-rw-r--r--docshell/test/test_bug637644.html5
-rw-r--r--dom/base/test/file_ipc_messagemanager_blob.html1
-rw-r--r--dom/base/test/mochitest.ini1
-rw-r--r--dom/base/test/test_ipc_messagemanager_blob.html3
-rw-r--r--dom/base/test/test_x-frame-options.html6
-rw-r--r--dom/browser-element/mochitest/browserElementTestHelpers.js4
-rw-r--r--dom/browser-element/mochitest/browserElement_BrowserWindowResize.js1
-rw-r--r--dom/browser-element/mochitest/browserElement_Close.js1
-rw-r--r--dom/browser-element/mochitest/browserElement_ContextmenuEvents.js1
-rw-r--r--dom/browser-element/mochitest/browserElement_CopyPaste.js1
-rw-r--r--dom/browser-element/mochitest/browserElement_DataURI.js1
-rw-r--r--dom/browser-element/mochitest/browserElement_Iconchange.js1
-rw-r--r--dom/browser-element/mochitest/browserElement_Manifestchange.js1
-rw-r--r--dom/browser-element/mochitest/browserElement_Metachange.js1
-rw-r--r--dom/browser-element/mochitest/browserElement_Opensearch.js1
-rw-r--r--dom/browser-element/mochitest/browserElement_PromptCheck.js1
-rw-r--r--dom/browser-element/mochitest/browserElement_PromptConfirm.js1
-rw-r--r--dom/browser-element/mochitest/browserElement_RemoveBrowserElement.js1
-rw-r--r--dom/browser-element/mochitest/browserElement_ScrollEvent.js1
-rw-r--r--dom/browser-element/mochitest/browserElement_Titlechange.js1
-rw-r--r--dom/browser-element/mochitest/browserElement_TopBarrier.js1
-rw-r--r--dom/html/test/test_fullscreen-api-race.html4
-rw-r--r--dom/ipc/tests/test_cpow_cookies.html3
-rw-r--r--dom/plugins/test/mochitest/test_pluginstream_err.html8
-rw-r--r--dom/tests/mochitest/bugs/test_resize_move_windows.html5
-rw-r--r--editor/libeditor/tests/browser.ini4
-rw-r--r--editor/libeditor/tests/bug527935.html2
-rw-r--r--editor/libeditor/tests/bug527935_2.html1
-rw-r--r--editor/libeditor/tests/file_bug635636_2.html1
-rw-r--r--editor/libeditor/tests/file_bug966155.html1
-rw-r--r--editor/libeditor/tests/file_bug966552.html1
-rw-r--r--editor/libeditor/tests/test_bug966155.html15
-rw-r--r--editor/libeditor/tests/test_bug966552.html13
-rw-r--r--testing/talos/talos/test.py1
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/001-1.html2
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/001-2.html4
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/001.html2
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/002-1.html2
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/002-2.html4
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/002.html2
-rw-r--r--toolkit/components/printing/tests/browser.ini3
-rw-r--r--toolkit/components/printing/tests/browser_page_change_print_original.js13
-rw-r--r--toolkit/components/printing/tests/file_page_change_print_original_1.html8
-rw-r--r--toolkit/components/printing/tests/file_page_change_print_original_2.html1
-rw-r--r--toolkit/mozapps/extensions/test/xpinstall/browser_datauri.js8
88 files changed, 291 insertions, 465 deletions
diff --git a/application/palemoon/app/application.ini b/application/palemoon/app/application.ini
new file mode 100644
index 000000000..c64ed9079
--- /dev/null
+++ b/application/palemoon/app/application.ini
@@ -0,0 +1,50 @@
+#if MOZ_APP_STATIC_INI
+#ifdef MOZ_BUILD_APP_IS_BROWSER
+; This file is not used. If you modify it and want the application to use
+; your modifications, move it under the browser/ subdirectory and start with
+; the "-app /path/to/browser/application.ini" argument.
+#else
+; This file is not used. If you modify it and want the application to use
+; your modifications, start with the "-app /path/to/application.ini"
+; argument.
+#endif
+#endif
+#if 0
+; 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/.
+#endif
+#filter substitution
+#include @TOPOBJDIR@/buildid.h
+#include @TOPOBJDIR@/source-repo.h
+
+[App]
+# Vendor=@MOZ_APP_VENDOR@
+Vendor=Moonchild Productions
+# Name=@MOZ_APP_BASENAME@
+Name=Pale Moon
+RemotingName=@MOZ_APP_REMOTINGNAME@
+#ifdef MOZ_APP_DISPLAYNAME
+CodeName=@MOZ_APP_DISPLAYNAME@
+#endif
+Version=@MOZ_APP_VERSION@
+#ifdef MOZ_APP_PROFILE
+Profile=@MOZ_APP_PROFILE@
+#endif
+BuildID=@MOZ_BUILDID@
+#ifdef MOZ_SOURCE_REPO
+SourceRepository=@MOZ_SOURCE_REPO@
+#endif
+#ifdef MOZ_SOURCE_STAMP
+SourceStamp=@MOZ_SOURCE_STAMP@
+#endif
+ID=@MOZ_APP_ID@
+
+[Gecko]
+MinVersion=@GRE_MILESTONE@
+MaxVersion=@GRE_MILESTONE@
+
+[XRE]
+#ifdef MOZ_PROFILE_MIGRATOR
+EnableProfileMigrator=1
+#endif \ No newline at end of file
diff --git a/application/palemoon/app/profile/palemoon.js b/application/palemoon/app/profile/palemoon.js
index f0e860749..90b4949b9 100644
--- a/application/palemoon/app/profile/palemoon.js
+++ b/application/palemoon/app/profile/palemoon.js
@@ -1058,11 +1058,6 @@ pref("browser.newtabpage.rows", 4);
// Enable the DOM fullscreen API.
pref("full-screen-api.enabled", true);
-// True if the fullscreen API requires approval upon a domain entering fullscreen.
-// Domains that have already had fullscreen permission granted won't re-request
-// approval.
-pref("full-screen-api.approval-required", true);
-
// about:permissions
// Maximum number of sites to return from the places database.
// 0-100 (currently)
diff --git a/application/palemoon/base/content/browser-fullScreen.js b/application/palemoon/base/content/browser-fullScreen.js
index ffe1da450..6afd247be 100644
--- a/application/palemoon/base/content/browser-fullScreen.js
+++ b/application/palemoon/base/content/browser-fullScreen.js
@@ -91,7 +91,7 @@ var FullScreen = {
if (!document.mozFullScreen)
return;
- // However, if we receive a "MozEnteredDomFullScreen" event for a document
+ // However, if we receive a "MozDOMFullscreen:NewOrigin" event for a document
// which is not a subdocument of a currently active (ie. visible) browser
// or iframe, we know that we've switched to a different frame since the
// request to enter full-screen was made, so we should exit full-screen
@@ -247,66 +247,20 @@ var FullScreen = {
this.warningBox.setAttribute("hidden", true);
this.warningBox.removeAttribute("fade-warning-out");
- this.warningBox.removeAttribute("obscure-browser");
this.warningBox = null;
},
- setFullscreenAllowed: function(isApproved) {
- // The "remember decision" checkbox is hidden when showing for documents that
- // the permission manager can't handle (documents with URIs without a host).
- // We simply require those to be approved every time instead.
- let rememberCheckbox = document.getElementById("full-screen-remember-decision");
- let uri = this.fullscreenDoc.nodePrincipal.URI;
- if (!rememberCheckbox.hidden) {
- if (rememberCheckbox.checked)
- Services.perms.add(uri,
- "fullscreen",
- isApproved ? Services.perms.ALLOW_ACTION : Services.perms.DENY_ACTION,
- Services.perms.EXPIRE_NEVER);
- else if (isApproved) {
- // The user has only temporarily approved fullscren for this fullscreen
- // session only. Add the permission (so Goanna knows to approve any further
- // fullscreen requests for this host in this fullscreen session) but add
- // a listener to revoke the permission when the chrome document exits
- // fullscreen.
- Services.perms.add(uri,
- "fullscreen",
- Services.perms.ALLOW_ACTION,
- Services.perms.EXPIRE_SESSION);
- var onFullscreenchange = function onFullscreenchange(event) {
- if (event.target == document && document.mozFullScreenElement == null) {
- // The chrome document has left fullscreen. Remove the temporary permission grant.
- Services.perms.remove(uri, "fullscreen");
- document.removeEventListener("mozfullscreenchange", onFullscreenchange);
- }
- }
- document.addEventListener("mozfullscreenchange", onFullscreenchange);
- }
- }
- if (this.warningBox)
- this.warningBox.setAttribute("fade-warning-out", "true");
- // If the document has been granted fullscreen, notify Goanna so it can resume
- // any pending pointer lock requests, otherwise exit fullscreen; the user denied
- // the fullscreen request.
- if (isApproved)
- Services.obs.notifyObservers(this.fullscreenDoc, "fullscreen-approved", "");
- else
- document.mozCancelFullScreen();
- },
-
warningBox: null,
warningFadeOutTimeout: null,
fullscreenDoc: null,
- // Shows the fullscreen approval UI, or if the domain has already been approved
- // for fullscreen, shows a warning that the site has entered fullscreen for a short
- // duration.
+ // Shows a warning that the site has entered fullscreen for a short duration.
showWarning: function(targetDoc) {
- if (!document.mozFullScreen ||
- !gPrefService.getBoolPref("full-screen-api.approval-required"))
+ let timeout = gPrefService.getIntPref("full-screen-api.warning.timeout");
+ if (!document.mozFullScreen || timeout <= 0)
return;
- // Set the strings on the fullscreen approval UI.
+ // Set the strings on the fullscreen warning UI.
this.fullscreenDoc = targetDoc;
let uri = this.fullscreenDoc.nodePrincipal.URI;
let host = null;
@@ -314,11 +268,8 @@ var FullScreen = {
host = uri.host;
} catch (e) { }
let hostLabel = document.getElementById("full-screen-domain-text");
- let rememberCheckbox = document.getElementById("full-screen-remember-decision");
- let isApproved = false;
if (host) {
- // Document's principal's URI has a host. Display a warning including the hostname and
- // show UI to enable the user to permanently grant this host permission to enter fullscreen.
+ // Document's principal's URI has a host. Display a warning including the hostname.
let utils = {};
Cu.import("resource://gre/modules/DownloadUtils.jsm", utils);
let displayHost = utils.DownloadUtils.getURIHost(uri.spec)[0];
@@ -326,17 +277,8 @@ var FullScreen = {
hostLabel.textContent = bundle.formatStringFromName("fullscreen.entered", [displayHost], 1);
hostLabel.removeAttribute("hidden");
-
- rememberCheckbox.label = bundle.formatStringFromName("fullscreen.rememberDecision", [displayHost], 1);
- rememberCheckbox.checked = false;
- rememberCheckbox.removeAttribute("hidden");
-
- // Note we only allow documents whose principal's URI has a host to
- // store permission grants.
- isApproved = Services.perms.testPermission(uri, "fullscreen") == Services.perms.ALLOW_ACTION;
} else {
hostLabel.setAttribute("hidden", "true");
- rememberCheckbox.setAttribute("hidden", "true");
}
// Note: the warning box can be non-null if the warning box from the previous request
@@ -354,32 +296,12 @@ var FullScreen = {
this.warningBox.removeAttribute("fade-warning-out");
}
- // If fullscreen mode has not yet been approved for the fullscreen
- // document's domain, show the approval UI and don't auto fade out the
- // fullscreen warning box. Otherwise, we're just notifying of entry into
- // fullscreen mode. Note if the resource's host is null, we must be
- // showing a local file or a local data URI, and we require explicit
- // approval every time.
- let authUI = document.getElementById("full-screen-approval-pane");
- if (isApproved) {
- authUI.setAttribute("hidden", "true");
- this.warningBox.removeAttribute("obscure-browser");
- } else {
- // Partially obscure the <browser> element underneath the approval UI.
- this.warningBox.setAttribute("obscure-browser", "true");
- authUI.removeAttribute("hidden");
- }
-
- // If we're not showing the fullscreen approval UI, we're just notifying the user
- // of the transition, so set a timeout to fade the warning out after a few moments.
- if (isApproved)
- this.warningFadeOutTimeout =
- setTimeout(
- function() {
- if (this.warningBox)
- this.warningBox.setAttribute("fade-warning-out", "true");
- }.bind(this),
- 3000);
+ // Set a timeout to fade the warning out after a few moments.
+ this.warningFadeOutTimeout = setTimeout(() => {
+ if (this.warningBox) {
+ this.warningBox.setAttribute("fade-warning-out", "true");
+ }
+ }, timeout);
},
showNavToolbox: function(trackMouse = true) {
diff --git a/application/palemoon/base/content/browser.css b/application/palemoon/base/content/browser.css
index 6fd2c5ce1..a2970aefc 100644
--- a/application/palemoon/base/content/browser.css
+++ b/application/palemoon/base/content/browser.css
@@ -504,6 +504,7 @@ window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(#nav-bar):not(
width: 100%;
height: 100%;
z-index: 2147483647 !important;
+ pointer-events: none;
}
#full-screen-warning-container[fade-warning-out] {
@@ -512,22 +513,13 @@ window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(#nav-bar):not(
opacity: 0.0;
}
-/* When the modal fullscreen approval UI is showing, don't allow interaction
- with the page, but when we're just showing the warning upon entering
- fullscreen on an already approved page, do allow interaction with the page.
- */
-#full-screen-warning-container:not([obscure-browser]) {
- pointer-events: none;
-}
-
#full-screen-warning-message {
/* We must specify a max-width, otherwise word-wrap:break-word doesn't
work in descendant <description> and <label> elements. Bug 630864. */
max-width: 800px;
}
-#full-screen-domain-text,
-#full-screen-remember-decision > .checkbox-label-box > .checkbox-label {
+#full-screen-domain-text {
word-wrap: break-word;
/* We must specify a min-width, otherwise word-wrap:break-word doesn't work. Bug 630864. */
min-width: 1px;
diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js
index 72d51ce4a..c1643caa4 100644
--- a/application/palemoon/base/content/browser.js
+++ b/application/palemoon/base/content/browser.js
@@ -1157,7 +1157,7 @@ var gBrowserInit = {
// Called when we enter DOM full-screen mode. Note we can already be in browser
// full-screen mode when we enter DOM full-screen mode.
- window.addEventListener("MozEnteredDomFullscreen", onMozEnteredDomFullscreen, true);
+ window.addEventListener("MozDOMFullscreen:NewOrigin", onMozEnteredDomFullscreen, true);
if (window.fullScreen)
onFullScreen();
diff --git a/application/palemoon/base/content/browser.xul b/application/palemoon/base/content/browser.xul
index 9b37f7b6f..f9030056e 100644
--- a/application/palemoon/base/content/browser.xul
+++ b/application/palemoon/base/content/browser.xul
@@ -974,18 +974,6 @@
<vbox id="full-screen-warning-message" align="center">
<description id="full-screen-domain-text"/>
<description class="full-screen-description" value="&fullscreenExitHint.value;"/>
- <vbox id="full-screen-approval-pane" align="center">
- <description class="full-screen-description" value="&fullscreenApproval.value;"/>
- <hbox>
- <button label="&fullscreenAllowButton.label;"
- oncommand="FullScreen.setFullscreenAllowed(true);"
- class="full-screen-approval-button"/>
- <button label="&fullscreenExitButton.label;"
- oncommand="FullScreen.setFullscreenAllowed(false);"
- class="full-screen-approval-button"/>
- </hbox>
- <checkbox id="full-screen-remember-decision"/>
- </vbox>
</vbox>
</hbox>
</hbox>
diff --git a/application/palemoon/base/content/pageinfo/pageInfo.xul b/application/palemoon/base/content/pageinfo/pageInfo.xul
index 5bca1b495..943fa805c 100644
--- a/application/palemoon/base/content/pageinfo/pageInfo.xul
+++ b/application/palemoon/base/content/pageinfo/pageInfo.xul
@@ -52,7 +52,6 @@
<command id="cmd_cookieDef" oncommand="onCheckboxClick('cookie');"/>
<command id="cmd_desktop-notificationDef" oncommand="onCheckboxClick('desktop-notification');"/>
<command id="cmd_installDef" oncommand="onCheckboxClick('install');"/>
- <command id="cmd_fullscreenDef" oncommand="onCheckboxClick('fullscreen');"/>
<command id="cmd_geoDef" oncommand="onCheckboxClick('geo');"/>
<command id="cmd_indexedDBDef" oncommand="onCheckboxClick('indexedDB');"/>
<command id="cmd_pluginsDef" oncommand="onCheckboxClick('plugins');"/>
@@ -61,12 +60,9 @@
<command id="cmd_cookieToggle" oncommand="onRadioClick('cookie');"/>
<command id="cmd_desktop-notificationToggle" oncommand="onRadioClick('desktop-notification');"/>
<command id="cmd_installToggle" oncommand="onRadioClick('install');"/>
- <command id="cmd_fullscreenToggle" oncommand="onRadioClick('fullscreen');"/>
<command id="cmd_geoToggle" oncommand="onRadioClick('geo');"/>
<command id="cmd_indexedDBToggle" oncommand="onRadioClick('indexedDB');"/>
<command id="cmd_pluginsToggle" oncommand="onPluginRadioClick(event);"/>
- <command id="cmd_pointerLockDef" oncommand="onCheckboxClick('pointerLock');"/>
- <command id="cmd_pointerLockToggle" oncommand="onRadioClick('pointerLock');"/>
</commandset>
<keyset id="pageInfoKeySet">
@@ -405,31 +401,6 @@
</radiogroup>
</hbox>
</vbox>
- <vbox class="permission" id="permFullscreenRow">
- <label class="permissionLabel" id="permFullscreenLabel"
- value="&permFullscreen;" control="fullscreenRadioGroup"/>
- <hbox id="permFullscreenBox" role="group" aria-labelledby="permFullscreenLabel">
- <checkbox id="fullscreenDef" command="cmd_fullscreenDef" label="&permUseDefault;"/>
- <spacer flex="1"/>
- <radiogroup id="fullscreenRadioGroup" orient="horizontal">
- <radio id="fullscreen#0" command="cmd_fullscreenToggle" label="&permAskAlways;"/>
- <radio id="fullscreen#1" command="cmd_fullscreenToggle" label="&permAllow;"/>
- <radio id="fullscreen#2" command="cmd_fullscreenToggle" label="&permBlock;"/>
- </radiogroup>
- </hbox>
- </vbox>
- <vbox class="permission" id="permPointerLockRow" >
- <label class="permissionLabel" id="permPointerLockLabel"
- value="&permPointerLock2;" control="pointerLockRadioGroup"/>
- <hbox id="permPointerLockBox" role="group" aria-labelledby="permPointerLockLabel">
- <checkbox id="pointerLockDef" command="cmd_pointerLockDef" label="&permAskAlways;"/>
- <spacer flex="1"/>
- <radiogroup id="pointerLockRadioGroup" orient="horizontal">
- <radio id="pointerLock#1" command="cmd_pointerLockToggle" label="&permAllow;"/>
- <radio id="pointerLock#2" command="cmd_pointerLockToggle" label="&permBlock;"/>
- </radiogroup>
- </hbox>
- </vbox>
</vbox>
</vbox>
diff --git a/application/palemoon/base/content/pageinfo/permissions.js b/application/palemoon/base/content/pageinfo/permissions.js
index 68261ce6e..e0fb01f76 100644
--- a/application/palemoon/base/content/pageinfo/permissions.js
+++ b/application/palemoon/base/content/pageinfo/permissions.js
@@ -76,20 +76,6 @@ var gPermObj = {
{
return UNKNOWN;
},
- fullscreen: function getFullscreenDefaultPermissions()
- {
- if (!gPrefs.getBoolPref("full-screen-api.enabled")) {
- return DENY;
- }
- return UNKNOWN;
- },
- pointerLock: function getPointerLockPermissions()
- {
- if (!gPrefs.getBoolPref("full-screen-api.pointer-lock.enabled")) {
- return DENY;
- }
- return ALLOW;
- },
};
var permissionObserver = {
diff --git a/application/palemoon/components/preferences/aboutPermissions.js b/application/palemoon/components/preferences/aboutPermissions.js
index 531bb061f..9fb12d081 100644
--- a/application/palemoon/components/preferences/aboutPermissions.js
+++ b/application/palemoon/components/preferences/aboutPermissions.js
@@ -418,31 +418,6 @@ var PermissionDefaults = {
Services.prefs.setBoolPref("dom.indexedDB.enabled", value);
},
- get fullscreen() {
- if (!Services.prefs.getBoolPref("full-screen-api.enabled")) {
- return this.DENY;
- }
- // We always ask for permission to fullscreen with a specific site,
- // so there is no global ALLOW.
- return this.UNKNOWN;
- },
- set fullscreen(aValue) {
- let value = (aValue != this.DENY);
- Services.prefs.setBoolPref("full-screen-api.enabled", value);
- },
-
- get pointerLock() {
- if (!Services.prefs.getBoolPref("full-screen-api.pointer-lock.enabled")) {
- return this.DENY;
- }
- // We always ask for permission to hide the mouse pointer
- // with a specific site, so there is no global ALLOW.
- return this.UNKNOWN;
- },
- set pointerLock(aValue) {
- let value = (aValue != this.DENY);
- Services.prefs.setBoolPref("full-screen-api.pointer-lock.enabled", value);
- },
}
/**
@@ -489,14 +464,12 @@ var AboutPermissions = {
* Potential future additions: "sts/use", "sts/subd"
*/
_supportedPermissions: ["password", "image", "popup", "cookie",
- "desktop-notification", "install", "geo", "indexedDB",
- "fullscreen", "pointerLock"],
+ "desktop-notification", "install", "geo", "indexedDB"],
/**
* Permissions that don't have a global "Allow" option.
*/
- _noGlobalAllow: ["desktop-notification", "geo", "indexedDB", "fullscreen",
- "pointerLock"],
+ _noGlobalAllow: ["desktop-notification", "geo", "indexedDB"],
/**
* Permissions that don't have a global "Deny" option.
@@ -543,8 +516,6 @@ var AboutPermissions = {
Services.prefs.addObserver("geo.enabled", this, false);
Services.prefs.addObserver("dom.indexedDB.enabled", this, false);
Services.prefs.addObserver("plugins.click_to_play", this, false);
- Services.prefs.addObserver("full-screen-api.enabled", this, false);
- Services.prefs.addObserver("full-screen-api.pointer-lock.enabled", this, false);
Services.prefs.addObserver("permissions.places-sites-limit", this, false);
Services.obs.addObserver(this, "perm-changed", false);
@@ -695,8 +666,6 @@ var AboutPermissions = {
Services.prefs.removeObserver("geo.enabled", this, false);
Services.prefs.removeObserver("dom.indexedDB.enabled", this, false);
Services.prefs.removeObserver("plugins.click_to_play", this, false);
- Services.prefs.removeObserver("full-screen-api.enabled", this, false);
- Services.prefs.removeObserver("full-screen-api.pointer-lock.enabled", this, false);
Services.prefs.removeObserver("permissions.places-sites-limit", this, false);
Services.obs.removeObserver(this, "perm-changed");
diff --git a/application/palemoon/components/preferences/aboutPermissions.xul b/application/palemoon/components/preferences/aboutPermissions.xul
index c099161f2..56d6cfbbf 100644
--- a/application/palemoon/components/preferences/aboutPermissions.xul
+++ b/application/palemoon/components/preferences/aboutPermissions.xul
@@ -336,64 +336,6 @@
<vbox id="plugins-box"/>
</vbox>
</hbox>
-
- <!-- Fullscreen -->
- <hbox id="fullscreen-pref-item"
- class="pref-item" align="top">
- <image class="pref-icon" type="fullscreen"/>
- <vbox>
- <hbox>
- <label class="pref-title" value="&fullscreen.label;"/>
- <label id="fullscreen-default" class="pref-default" value="*"/>
- </hbox>
- <hbox align="center">
- <menulist id="fullscreen-menulist"
- class="pref-menulist"
- type="fullscreen"
- oncommand="AboutPermissions.onPermissionCommand(event, false);">
- <menupopup>
- <menuitem id="fullscreen-0" value="0" label="&permission.alwaysAsk;"/>
- <menuitem id="fullscreen-1" value="1" label="&permission.allow;"/>
- <menuitem id="fullscreen-2" value="2" label="&permission.block;"/>
- </menupopup>
- </menulist>
- <button id="fullscreen-set-default"
- class="pref-set-default"
- label="&permission.default;"
- type="fullscreen"
- oncommand="AboutPermissions.onPermissionCommand(event, true);"/>
- </hbox>
- </vbox>
- </hbox>
-
- <!-- PointerLock -->
- <hbox id="pointerLock-pref-item"
- class="pref-item" align="top">
- <image class="pref-icon" type="pointerLock"/>
- <vbox>
- <hbox>
- <label class="pref-title" value="&pointerLock.label;"/>
- <label id="pointerLock-default" class="pref-default" value="*"/>
- </hbox>
- <hbox>
- <menulist id="pointerLock-menulist"
- class="pref-menulist"
- type="pointerLock"
- oncommand="AboutPermissions.onPermissionCommand(event, false);">
- <menupopup>
- <menuitem id="pointerLock-0" value="0" label="&permission.alwaysAsk;"/>
- <menuitem id="pointerLock-1" value="1" label="&permission.allow;"/>
- <menuitem id="pointerLock-2" value="2" label="&permission.block;"/>
- </menupopup>
- </menulist>
- <button id="pointerLock-set-default"
- class="pref-set-default"
- label="&permission.default;"
- type="pointerLock"
- oncommand="AboutPermissions.onPermissionCommand(event, true);"/>
- </hbox>
- </vbox>
- </hbox>
</vbox>
</hbox>
diff --git a/application/palemoon/locales/en-US/chrome/browser/browser.dtd b/application/palemoon/locales/en-US/chrome/browser/browser.dtd
index 65cc34fa0..3d5f22b33 100644
--- a/application/palemoon/locales/en-US/chrome/browser/browser.dtd
+++ b/application/palemoon/locales/en-US/chrome/browser/browser.dtd
@@ -107,9 +107,6 @@ These should match what Safari and other Apple applications use on OS X Lion. --
<!ENTITY fullScreenAutohide.accesskey "H">
<!ENTITY fullScreenExit.label "Exit Full Screen Mode">
<!ENTITY fullScreenExit.accesskey "F">
-<!ENTITY fullscreenAllowButton.label "Allow">
-<!ENTITY fullscreenExitButton.label "Deny">
-<!ENTITY fullscreenApproval.value "Allow fullscreen?">
<!ENTITY fullscreenExitHint.value "Press ESC at any time to exit fullscreen.">
<!ENTITY leaveDOMFullScreen.label "Exit Full Screen">
diff --git a/application/palemoon/locales/en-US/chrome/browser/browser.properties b/application/palemoon/locales/en-US/chrome/browser/browser.properties
index 481a061d9..5dce994fe 100644
--- a/application/palemoon/locales/en-US/chrome/browser/browser.properties
+++ b/application/palemoon/locales/en-US/chrome/browser/browser.properties
@@ -377,8 +377,6 @@ dataReportingNotification.button.accessKey = C
# LOCALIZATION NOTE (fullscreen.entered): displayed when we enter HTML5 fullscreen mode, %S is the domain name of the focused website (e.g. mozilla.com).
fullscreen.entered=%S is now fullscreen.
-# LOCALIZATION NOTE (fullscreen.rememberDecision): displayed when we enter HTML5 fullscreen mode, %S is the domain name of the focused website (e.g. mozilla.com).
-fullscreen.rememberDecision=Remember decision for %S
# LOCALIZATION NOTE (getUserMedia.shareCamera.message, getUserMedia.shareMicrophone.message, getUserMedia.shareCameraAndMicrophone.message): %S is the website origin (e.g. www.mozilla.org)
# LOCALIZATION NOTE (getUserMedia.shareSelectedDevices.label):
diff --git a/application/palemoon/locales/en-US/chrome/browser/pageInfo.dtd b/application/palemoon/locales/en-US/chrome/browser/pageInfo.dtd
index 7f3797276..70c2bbc13 100644
--- a/application/palemoon/locales/en-US/chrome/browser/pageInfo.dtd
+++ b/application/palemoon/locales/en-US/chrome/browser/pageInfo.dtd
@@ -66,8 +66,6 @@
<!ENTITY permInstall "Install Extensions or Themes">
<!ENTITY permGeo "Share Location">
<!ENTITY permPlugins "Activate Plugins">
-<!ENTITY permFullscreen "Enter Fullscreen">
-<!ENTITY permPointerLock2 "Hide the Mouse Pointer">
<!ENTITY permIndexedDB "Maintain Offline Storage">
<!ENTITY permClearStorage "Clear Storage">
diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/aboutPermissions.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/aboutPermissions.dtd
index 9e36520c8..14412607a 100644
--- a/application/palemoon/locales/en-US/chrome/browser/preferences/aboutPermissions.dtd
+++ b/application/palemoon/locales/en-US/chrome/browser/preferences/aboutPermissions.dtd
@@ -51,8 +51,4 @@
<!ENTITY popup.label "Open Pop-up Windows">
-<!ENTITY fullscreen.label "Fullscreen">
-
-<!ENTITY pointerLock.label "Hide the Mouse Pointer">
-
<!ENTITY focusSearch.key "f">
diff --git a/application/palemoon/themes/linux/browser.css b/application/palemoon/themes/linux/browser.css
index 43fd637fb..dbdc06235 100644
--- a/application/palemoon/themes/linux/browser.css
+++ b/application/palemoon/themes/linux/browser.css
@@ -2067,10 +2067,6 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
box-shadow: 0 0 2px white;
}
-#full-screen-warning-container[obscure-browser] {
- background-color: rgba(0,0,0,0.3);
-}
-
.full-screen-description {
font-size: 150%;
}
@@ -2079,11 +2075,6 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
font-size: 300%;
}
-.full-screen-approval-button,
-#full-screen-remember-decision {
- font-size: 120%;
-}
-
%ifdef MOZ_DEVTOOLS
%include ../../../../devtools/client/themes/responsivedesign.inc.css
%include ../../../../devtools/client/themes/commandline.inc.css
diff --git a/application/palemoon/themes/linux/preferences/aboutPermissions.css b/application/palemoon/themes/linux/preferences/aboutPermissions.css
index 224c88018..2ad833fb2 100644
--- a/application/palemoon/themes/linux/preferences/aboutPermissions.css
+++ b/application/palemoon/themes/linux/preferences/aboutPermissions.css
@@ -104,12 +104,6 @@
.pref-icon[type="plugins"] {
list-style-image: url(chrome://mozapps/skin/plugins/pluginGeneric.png);
}
-.pref-icon[type="fullscreen"] {
- list-style-image: url(chrome://global/skin/icons/question-64.png);
-}
-.pref-icon[type="pointerLock"] {
- list-style-image: url(chrome://global/skin/icons/question-64.png);
-}
.pref-title {
font-size: 125%;
diff --git a/application/palemoon/themes/osx/browser.css b/application/palemoon/themes/osx/browser.css
index d5feadf29..6307c5f58 100644
--- a/application/palemoon/themes/osx/browser.css
+++ b/application/palemoon/themes/osx/browser.css
@@ -2346,10 +2346,6 @@ toolbar[brighttext] #addonbar-closebutton {
box-shadow: 0 0 2px white;
}
-#full-screen-warning-container[obscure-browser] {
- background-color: rgba(0,0,0,0.3);
-}
-
.full-screen-description {
font-size: 150%;
}
@@ -2358,11 +2354,6 @@ toolbar[brighttext] #addonbar-closebutton {
font-size: 300%;
}
-.full-screen-approval-button,
-#full-screen-remember-decision {
- font-size: 120%;
-}
-
%ifdef MOZ_DEVTOOLS
%include ../../../../devtools/client/themes/responsivedesign.inc.css
%include ../../../../devtools/client/themes/commandline.inc.css
diff --git a/application/palemoon/themes/osx/preferences/aboutPermissions.css b/application/palemoon/themes/osx/preferences/aboutPermissions.css
index a97e71e04..de636f5c4 100644
--- a/application/palemoon/themes/osx/preferences/aboutPermissions.css
+++ b/application/palemoon/themes/osx/preferences/aboutPermissions.css
@@ -107,12 +107,6 @@
.pref-icon[type="plugins"] {
list-style-image: url(chrome://mozapps/skin/plugins/pluginGeneric.png);
}
-.pref-icon[type="fullscreen"] {
- list-style-image: url(chrome://global/skin/icons/question-64.png);
-}
-.pref-icon[type="pointerLock"] {
- list-style-image: url(chrome://global/skin/icons/question-64.png);
-}
.pref-title {
font-size: 125%;
diff --git a/application/palemoon/themes/windows/browser.css b/application/palemoon/themes/windows/browser.css
index 3d519ba85..b87b50732 100644
--- a/application/palemoon/themes/windows/browser.css
+++ b/application/palemoon/themes/windows/browser.css
@@ -2820,10 +2820,6 @@ toolbar[brighttext] #addonbar-closebutton {
box-shadow: 0 0 2px white;
}
-#full-screen-warning-container[obscure-browser] {
- background-color: rgba(0,0,0,0.3);
-}
-
.full-screen-description {
font-size: 150%;
}
@@ -2832,11 +2828,6 @@ toolbar[brighttext] #addonbar-closebutton {
font-size: 300%;
}
-.full-screen-approval-button,
-#full-screen-remember-decision {
- font-size: 120%;
-}
-
%ifdef MOZ_DEVTOOLS
%include ../../../../devtools/client/themes/responsivedesign.inc.css
%include ../../../../devtools/client/themes/commandline.inc.css
diff --git a/application/palemoon/themes/windows/preferences/aboutPermissions.css b/application/palemoon/themes/windows/preferences/aboutPermissions.css
index 73b8d6e14..c985150de 100644
--- a/application/palemoon/themes/windows/preferences/aboutPermissions.css
+++ b/application/palemoon/themes/windows/preferences/aboutPermissions.css
@@ -107,12 +107,6 @@
.pref-icon[type="plugins"] {
list-style-image: url(chrome://mozapps/skin/plugins/pluginGeneric-48.png);
}
-.pref-icon[type="fullscreen"] {
- list-style-image: url(chrome://global/skin/icons/question-48.png);
-}
-.pref-icon[type="pointerLock"] {
- list-style-image: url(chrome://global/skin/icons/question-48.png);
-}
.pref-title {
font-size: 125%;
diff --git a/browser/app/application.ini b/browser/app/application.ini
new file mode 100644
index 000000000..05317eee9
--- /dev/null
+++ b/browser/app/application.ini
@@ -0,0 +1,50 @@
+#if MOZ_APP_STATIC_INI
+#ifdef MOZ_BUILD_APP_IS_BROWSER
+; This file is not used. If you modify it and want the application to use
+; your modifications, move it under the browser/ subdirectory and start with
+; the "-app /path/to/browser/application.ini" argument.
+#else
+; This file is not used. If you modify it and want the application to use
+; your modifications, start with the "-app /path/to/application.ini"
+; argument.
+#endif
+#endif
+#if 0
+; 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/.
+#endif
+#filter substitution
+#include @TOPOBJDIR@/buildid.h
+#include @TOPOBJDIR@/source-repo.h
+
+[App]
+# Vendor=@MOZ_APP_VENDOR@
+Vendor=Moonchild Productions
+# Name=@MOZ_APP_BASENAME@
+Name=Basilisk
+RemotingName=@MOZ_APP_REMOTINGNAME@
+#ifdef MOZ_APP_DISPLAYNAME
+CodeName=@MOZ_APP_DISPLAYNAME@
+#endif
+Version=@MOZ_APP_VERSION@
+#ifdef MOZ_APP_PROFILE
+Profile=@MOZ_APP_PROFILE@
+#endif
+BuildID=@MOZ_BUILDID@
+#ifdef MOZ_SOURCE_REPO
+SourceRepository=@MOZ_SOURCE_REPO@
+#endif
+#ifdef MOZ_SOURCE_STAMP
+SourceStamp=@MOZ_SOURCE_STAMP@
+#endif
+ID=@MOZ_APP_ID@
+
+[Gecko]
+MinVersion=@GRE_MILESTONE@
+MaxVersion=@GRE_MILESTONE@
+
+[XRE]
+#ifdef MOZ_PROFILE_MIGRATOR
+EnableProfileMigrator=1
+#endif \ No newline at end of file
diff --git a/browser/branding/unofficial/serpent.VisualElementsManifest.xml b/browser/branding/unofficial/basilisk.VisualElementsManifest.xml
index 5046ee7da..5046ee7da 100644
--- a/browser/branding/unofficial/serpent.VisualElementsManifest.xml
+++ b/browser/branding/unofficial/basilisk.VisualElementsManifest.xml
diff --git a/build/application.ini b/build/application.ini
index 8f65421ed..80cad7e9b 100644
--- a/build/application.ini
+++ b/build/application.ini
@@ -1,62 +1,6 @@
-#if MOZ_APP_STATIC_INI
-#ifdef MOZ_BUILD_APP_IS_BROWSER
-; This file is not used. If you modify it and want the application to use
-; your modifications, move it under the browser/ subdirectory and start with
-; the "-app /path/to/browser/application.ini" argument.
-#else
-; This file is not used. If you modify it and want the application to use
-; your modifications, start with the "-app /path/to/application.ini"
-; argument.
-#endif
-#endif
-#if 0
-; 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/.
-#endif
+# Global application.ini template is not conducive to a codebase that
+# is used for multiple applications especially if they have multiple
+# branding OR spaces in their Vendor or Name so include one from the
+# application source directory instead.
#filter substitution
-#include @TOPOBJDIR@/buildid.h
-#include @TOPOBJDIR@/source-repo.h
-[App]
-#ifdef MC_OFFICIAL
-#if defined(MC_PALEMOON) || defined(MC_BASILISK)
-Vendor=Moonchild Productions
-#elif defined(BINOC_BOREALIS)
-Vendor=Binary Outcast
-#else
-Vendor=@MOZ_APP_VENDOR@
-#endif
-#else
-Vendor=@MOZ_APP_VENDOR@
-#endif
-#ifdef MC_PALEMOON
-Name=Pale Moon
-#else
-Name=@MOZ_APP_BASENAME@
-#endif
-RemotingName=@MOZ_APP_REMOTINGNAME@
-#ifdef MOZ_APP_DISPLAYNAME
-CodeName=@MOZ_APP_DISPLAYNAME@
-#endif
-Version=@MOZ_APP_VERSION@
-#ifdef MOZ_APP_PROFILE
-Profile=@MOZ_APP_PROFILE@
-#endif
-BuildID=@MOZ_BUILDID@
-#ifdef MOZ_SOURCE_REPO
-SourceRepository=@MOZ_SOURCE_REPO@
-#endif
-#ifdef MOZ_SOURCE_STAMP
-SourceStamp=@MOZ_SOURCE_STAMP@
-#endif
-ID=@MOZ_APP_ID@
-
-[Gecko]
-MinVersion=@GRE_MILESTONE@
-MaxVersion=@GRE_MILESTONE@
-
-[XRE]
-#ifdef MOZ_PROFILE_MIGRATOR
-EnableProfileMigrator=1
-#endif
-
+#include @TOPSRCDIR@/@MOZ_BUILD_APP@/app/application.ini
diff --git a/build/moz.build b/build/moz.build
index d96724cad..616a64c3f 100644
--- a/build/moz.build
+++ b/build/moz.build
@@ -18,9 +18,15 @@ else:
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
DIRS += ['annotationProcessors']
-for var in ('GRE_MILESTONE', 'MOZ_APP_VERSION', 'MOZ_APP_BASENAME',
- 'MOZ_APP_VENDOR', 'MOZ_APP_ID', 'MAR_CHANNEL_ID',
- 'ACCEPTED_MAR_CHANNEL_IDS', 'MOZ_APP_REMOTINGNAME'):
+for var in ('GRE_MILESTONE',
+ 'MOZ_APP_VERSION',
+ 'MOZ_APP_BASENAME',
+ 'MOZ_APP_VENDOR',
+ 'MOZ_APP_ID',
+ 'MAR_CHANNEL_ID',
+ 'ACCEPTED_MAR_CHANNEL_IDS',
+ 'MOZ_APP_REMOTINGNAME',
+ 'MOZ_BUILD_APP'):
DEFINES[var] = CONFIG[var]
if CONFIG['MOZ_APP_DISPLAYNAME'] != CONFIG['MOZ_APP_BASENAME']:
@@ -33,15 +39,6 @@ if CONFIG['MOZ_PHOENIX']:
if CONFIG['MC_OFFICIAL']:
DEFINES['MC_OFFICIAL'] = CONFIG['MC_OFFICIAL']
-if CONFIG['MC_BASILISK']:
- DEFINES['MC_BASILISK'] = CONFIG['MC_BASILISK']
-
-if CONFIG['MC_PALEMOON']:
- DEFINES['MC_PALEMOON'] = CONFIG['MC_PALEMOON']
-
-if CONFIG['BINOC_BOREALIS']:
- DEFINES['BINOC_BOREALIS'] = CONFIG['BINOC_BOREALIS']
-
if CONFIG['MOZ_APP_PROFILE']:
DEFINES['MOZ_APP_PROFILE'] = CONFIG['MOZ_APP_PROFILE']
@@ -86,6 +83,7 @@ if CONFIG['MOZ_APP_BASENAME']:
appini.script = 'appini_header.py'
appini.inputs = ['!/dist/bin/application.ini']
+DEFINES['TOPSRCDIR'] = TOPSRCDIR
DEFINES['TOPOBJDIR'] = TOPOBJDIR
# NOTE: Keep .gdbinit in the topsrcdir for people who run gdb from the topsrcdir.
diff --git a/devtools/client/inspector/markup/test/browser.ini b/devtools/client/inspector/markup/test/browser.ini
index 3116e4beb..9ff73a6c6 100644
--- a/devtools/client/inspector/markup/test/browser.ini
+++ b/devtools/client/inspector/markup/test/browser.ini
@@ -32,6 +32,8 @@ support-files =
doc_markup_void_elements.xhtml
doc_markup_whitespace.html
doc_markup_xul.xul
+ doc_markup_update-on-navigtion_1.html
+ doc_markup_update-on-navigtion_2.html
head.js
helper_attributes_test_runner.js
helper_events_test_runner.js
diff --git a/devtools/client/inspector/markup/test/browser_markup_update-on-navigtion.js b/devtools/client/inspector/markup/test/browser_markup_update-on-navigtion.js
index 241cea672..c298878c3 100644
--- a/devtools/client/inspector/markup/test/browser_markup_update-on-navigtion.js
+++ b/devtools/client/inspector/markup/test/browser_markup_update-on-navigtion.js
@@ -5,9 +5,8 @@
// Test that markup view handles page navigation correctly.
-const SCHEMA = "data:text/html;charset=UTF-8,";
-const URL_1 = SCHEMA + "<div id='one' style='color:red;'>ONE</div>";
-const URL_2 = SCHEMA + "<div id='two' style='color:green;'>TWO</div>";
+const URL_1 = URL_ROOT + "doc_markup_update-on-navigtion_1.html";
+const URL_2 = URL_ROOT + "doc_markup_update-on-navigtion_2.html";
add_task(function* () {
let {inspector, testActor} = yield openInspectorForURL(URL_1);
diff --git a/devtools/client/inspector/markup/test/doc_markup_update-on-navigtion_1.html b/devtools/client/inspector/markup/test/doc_markup_update-on-navigtion_1.html
new file mode 100644
index 000000000..d2fdb1629
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_update-on-navigtion_1.html
@@ -0,0 +1 @@
+<div id='one' style='color:red;'>ONE</div>
diff --git a/devtools/client/inspector/markup/test/doc_markup_update-on-navigtion_2.html b/devtools/client/inspector/markup/test/doc_markup_update-on-navigtion_2.html
new file mode 100644
index 000000000..93d84a088
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_update-on-navigtion_2.html
@@ -0,0 +1 @@
+<div id='two' style='color:green;'>TWO</div>
diff --git a/docshell/base/crashtests/914521.html b/docshell/base/crashtests/914521.html
index 9ae18b860..eb0a43749 100644
--- a/docshell/base/crashtests/914521.html
+++ b/docshell/base/crashtests/914521.html
@@ -20,6 +20,14 @@ function f()
finish();
}
+function init()
+{
+ SpecialPowers.pushPrefEnv({"set": [
+ ["security.data_uri.block_toplevel_data_uri_navigations", false],
+ ]}, start);
+
+}
+
function start()
{
var html = "<script>" + f + "<\/script><body onload=f()>";
@@ -29,5 +37,5 @@ function start()
</script>
</head>
-<body onload="start();"></body>
+<body onload="init();"></body>
</html>
diff --git a/docshell/test/chrome/test_bug364461.xul b/docshell/test/chrome/test_bug364461.xul
index 85154f9d7..9e45ce971 100644
--- a/docshell/test/chrome/test_bug364461.xul
+++ b/docshell/test/chrome/test_bug364461.xul
@@ -29,9 +29,15 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=364461
/** Test for Bug 364461 **/
SimpleTest.waitForExplicitFinish();
-window.open("bug364461_window.xul", "bug364461",
- "chrome,width=600,height=600");
+SpecialPowers.pushPrefEnv({
+ "set":[["security.data_uri.block_toplevel_data_uri_navigations", false]]
+}, runTests);
+
+function runTests() {
+ window.open("bug364461_window.xul", "bug364461",
+ "chrome,width=600,height=600");
+}
]]>
</script>
diff --git a/docshell/test/file_bug598895_1.html b/docshell/test/file_bug598895_1.html
new file mode 100644
index 000000000..6fbb13a02
--- /dev/null
+++ b/docshell/test/file_bug598895_1.html
@@ -0,0 +1 @@
+<script>window.onload = function() { opener.postMessage('loaded', '*'); }</script><body>Should show</body>
diff --git a/docshell/test/file_bug598895_2.html b/docshell/test/file_bug598895_2.html
new file mode 100644
index 000000000..0822c566b
--- /dev/null
+++ b/docshell/test/file_bug598895_2.html
@@ -0,0 +1 @@
+<script>window.onload = function() { opener.postMessage('loaded', '*'); }</script><body></body>
diff --git a/docshell/test/file_bug637644_1.html b/docshell/test/file_bug637644_1.html
new file mode 100644
index 000000000..6fbb13a02
--- /dev/null
+++ b/docshell/test/file_bug637644_1.html
@@ -0,0 +1 @@
+<script>window.onload = function() { opener.postMessage('loaded', '*'); }</script><body>Should show</body>
diff --git a/docshell/test/file_bug637644_2.html b/docshell/test/file_bug637644_2.html
new file mode 100644
index 000000000..0822c566b
--- /dev/null
+++ b/docshell/test/file_bug637644_2.html
@@ -0,0 +1 @@
+<script>window.onload = function() { opener.postMessage('loaded', '*'); }</script><body></body>
diff --git a/docshell/test/mochitest.ini b/docshell/test/mochitest.ini
index 2298bed74..d2e378928 100644
--- a/docshell/test/mochitest.ini
+++ b/docshell/test/mochitest.ini
@@ -21,9 +21,13 @@ support-files =
file_bug540462.html
file_bug580069_1.html
file_bug580069_2.sjs
+ file_bug598895_1.html
+ file_bug598895_2.html
file_bug590573_1.html
file_bug590573_2.html
file_bug634834.html
+ file_bug637644_1.html
+ file_bug637644_2.html
file_bug640387.html
file_bug653741.html
file_bug660404
diff --git a/docshell/test/navigation/NavigationUtils.js b/docshell/test/navigation/NavigationUtils.js
index c90ea74d5..72bea7dde 100644
--- a/docshell/test/navigation/NavigationUtils.js
+++ b/docshell/test/navigation/NavigationUtils.js
@@ -9,10 +9,10 @@
///////////////////////////////////////////////////////////////////////////
var body = "This frame was navigated.";
-var target_url = "data:text/html,<html><body>" + body + "</body></html>";
+var target_url = "navigation_target_url.html"
var popup_body = "This is a popup";
-var target_popup_url = "data:text/html,<html><body>" + popup_body + "</body></html>";
+var target_popup_url = "navigation_target_popup_url.html";
///////////////////////////////////////////////////////////////////////////
// Functions that navigate frames
@@ -58,7 +58,7 @@ function navigateByHyperlink(name) {
function isNavigated(wnd, message) {
var result = null;
try {
- result = SpecialPowers.wrap(wnd).document.body.innerHTML;
+ result = SpecialPowers.wrap(wnd).document.body.innerHTML.trim();
} catch(ex) {
result = ex;
}
@@ -68,7 +68,7 @@ function isNavigated(wnd, message) {
function isBlank(wnd, message) {
var result = null;
try {
- result = wnd.document.body.innerHTML;
+ result = wnd.document.body.innerHTML.trim();
} catch(ex) {
result = ex;
}
@@ -146,7 +146,9 @@ function xpcGetFramesByName(name) {
function xpcCleanupWindows() {
xpcEnumerateContentWindows(function(win) {
- if (win.location && win.location.protocol == "data:")
+ if (win.location &&
+ (win.location.href.endsWith(target_url) ||
+ win.location.href.endsWith(target_popup_url))) {
win.close();
});
}
@@ -177,12 +179,12 @@ function xpcWaitForFinishedFrames(callback, numFrames) {
}
function searchForFinishedFrames(win) {
- if ((escape(unescape(win.location)) == escape(target_url) ||
- escape(unescape(win.location)) == escape(target_popup_url)) &&
+ if ((win.location.href.endsWith(target_url) ||
+ win.location.href.endsWith(target_popup_url)) &&
win.document &&
win.document.body &&
- (win.document.body.textContent == body ||
- win.document.body.textContent == popup_body) &&
+ (win.document.body.textContent.trim() == body ||
+ win.document.body.textContent.trim() == popup_body) &&
win.document.readyState == "complete") {
var util = win.QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
diff --git a/docshell/test/navigation/file_scrollRestoration.html b/docshell/test/navigation/file_scrollRestoration.html
index 92e43d7fb..766949d13 100644
--- a/docshell/test/navigation/file_scrollRestoration.html
+++ b/docshell/test/navigation/file_scrollRestoration.html
@@ -40,7 +40,7 @@
document.getElementById("bottom").scrollIntoView();
window.onunload = null; // Should get bfcache behavior.
opener.setTimeout("testWindow.history.back();", 250);
- window.location.href = 'data:text/html,';
+ window.location.href = 'about:blank';
break;
}
case 4: {
@@ -57,7 +57,7 @@
opener.is(history.scrollRestoration, "manual", "Should have the same scrollRestoration mode as before fragment navigation.");
window.onunload = function() {} // Disable bfcache.
opener.setTimeout("is(testWindow.history.scrollRestoration, 'auto'); testWindow.history.back();", 250);
- window.location.href = 'data:text/html,';
+ window.location.href = 'about:blank';
break;
}
case 6: {
diff --git a/docshell/test/navigation/mochitest.ini b/docshell/test/navigation/mochitest.ini
index 764e400a8..1b5f33c7f 100644
--- a/docshell/test/navigation/mochitest.ini
+++ b/docshell/test/navigation/mochitest.ini
@@ -1,6 +1,8 @@
[DEFAULT]
support-files =
NavigationUtils.js
+ navigation_target_url.html
+ navigation_target_popup_url.html
blank.html
file_bug462076_1.html
file_bug462076_2.html
diff --git a/docshell/test/navigation/navigation_target_popup_url.html b/docshell/test/navigation/navigation_target_popup_url.html
new file mode 100644
index 000000000..cfe6de009
--- /dev/null
+++ b/docshell/test/navigation/navigation_target_popup_url.html
@@ -0,0 +1 @@
+<html><body>This is a popup</body></html>
diff --git a/docshell/test/navigation/navigation_target_url.html b/docshell/test/navigation/navigation_target_url.html
new file mode 100644
index 000000000..a485e8133
--- /dev/null
+++ b/docshell/test/navigation/navigation_target_url.html
@@ -0,0 +1 @@
+<html><body>This frame was navigated.</body></html>
diff --git a/docshell/test/navigation/open.html b/docshell/test/navigation/open.html
index 1bb70f865..97eb9b76e 100644
--- a/docshell/test/navigation/open.html
+++ b/docshell/test/navigation/open.html
@@ -3,7 +3,7 @@
<script>
var target = window.location.hash.substring(1);
document.write("target=" + target);
-window.open("data:text/html,<html><body>This is a popup</body></html>", target, "width=10,height=10");
+window.open("navigation_target_popup_url.html", target, "width=10,height=10");
</script>
</body>
</html>
diff --git a/docshell/test/navigation/test_triggeringprincipal_window_open.html b/docshell/test/navigation/test_triggeringprincipal_window_open.html
index d5d7f210b..dbee21777 100644
--- a/docshell/test/navigation/test_triggeringprincipal_window_open.html
+++ b/docshell/test/navigation/test_triggeringprincipal_window_open.html
@@ -13,8 +13,7 @@
/* We call window.open() using different URIs and make sure the triggeringPrincipal
* loadingPrincipal are correct.
* Test1: window.open(http:)
- * Test2: window.open(data:)
- * Test3: window.open(javascript:)
+ * Test2: window.open(javascript:)
*/
const TRIGGERING_PRINCIPAL_URI =
@@ -22,7 +21,7 @@ const TRIGGERING_PRINCIPAL_URI =
SimpleTest.waitForExplicitFinish();
-const NUM_TESTS = 3;
+const NUM_TESTS = 2;
var test_counter = 0;
function checkFinish() {
@@ -54,28 +53,7 @@ httpWin.onload = function() {
}
// ----------------------------------------------------------------------------
-// Test 2: window.open(data:)
-var dataWin = window.open("data:text/html,<html><body>data</body></html>", "_blank", "width=10,height=10");
-dataWin.onload = function() {
- var dataChannel = SpecialPowers.wrap(dataWin.document).docShell.currentDocumentChannel;
- var dataTriggeringPrincipal = dataChannel.loadInfo.triggeringPrincipal.URI.asciiSpec;
- var dataLoadingPrincipal = dataChannel.loadInfo.loadingPrincipal;
-
- is(dataTriggeringPrincipal, TRIGGERING_PRINCIPAL_URI,
- "TriggeringPrincipal for window.open(data:) should be the principal of the document");
-
- is(dataWin.document.referrer, "",
- "Referrer for window.open(data:) should be empty");
-
- is(dataLoadingPrincipal, null,
- "LoadingPrincipal for window.open(data:) should be null");
-
- dataWin.close();
- checkFinish();
-}
-
-// ----------------------------------------------------------------------------
-// Test 3: window.open(javascript:)
+// Test 2: window.open(javascript:)
var jsWin = window.open("javascript:'<html><body>js</body></html>';", "_blank", "width=10,height=10");
jsWin.onload = function() {
var jsChannel = SpecialPowers.wrap(jsWin.document).docShell.currentDocumentChannel;
diff --git a/docshell/test/test_bug598895.html b/docshell/test/test_bug598895.html
index 52b9537be..5cc74e42c 100644
--- a/docshell/test/test_bug598895.html
+++ b/docshell/test/test_bug598895.html
@@ -43,9 +43,8 @@ window.onmessage = function (ev) {
}
}
-var win2 = window.open("data:text/html,<script>window.onload = function() { opener.postMessage('loaded', '*'); }</" + "script><body>Should show</body>");
-
-var win3 = window.open("data:text/html,<script>window.onload = function() { opener.postMessage('loaded', '*'); }</" + "script><body></body>");
+var win2 = window.open("file_bug598895_1.html");
+var win3 = window.open("file_bug598895_2.html");
});
</script>
</pre>
diff --git a/docshell/test/test_bug637644.html b/docshell/test/test_bug637644.html
index d172ada4a..4192fae22 100644
--- a/docshell/test/test_bug637644.html
+++ b/docshell/test/test_bug637644.html
@@ -43,9 +43,8 @@ window.onmessage = function (ev) {
}
}
-var win2 = window.open("data:text/html,<script>window.onload = function() { opener.postMessage('loaded', '*'); }</" + "script><body>Should show</body>", "", "height=500,width=500");
-
-var win3 = window.open("data:text/html,<script>window.onload = function() { opener.postMessage('loaded', '*'); }</" + "script><body></body>", "", "height=500,width=500");
+var win2 = window.open("file_bug637644_1.html", "", "height=500,width=500");
+var win3 = window.open("file_bug637644_2.html", "", "height=500,width=500");
});
</script>
</pre>
diff --git a/dom/base/test/file_ipc_messagemanager_blob.html b/dom/base/test/file_ipc_messagemanager_blob.html
new file mode 100644
index 000000000..dbdd64a34
--- /dev/null
+++ b/dom/base/test/file_ipc_messagemanager_blob.html
@@ -0,0 +1 @@
+<!DOCTYPE HTML><html><body></body></html>
diff --git a/dom/base/test/mochitest.ini b/dom/base/test/mochitest.ini
index ddfd57443..b3b804ce4 100644
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -676,6 +676,7 @@ skip-if = (toolkit == 'android') # Android: Bug 775227
[test_intersectionobservers.html]
skip-if = true # Track Bug 1320704
[test_ipc_messagemanager_blob.html]
+support-files = file_ipc_messagemanager_blob.html
[test_link_prefetch.html]
skip-if = !e10s # Track Bug 1281415
[test_link_stylesheet.html]
diff --git a/dom/base/test/test_ipc_messagemanager_blob.html b/dom/base/test/test_ipc_messagemanager_blob.html
index 74eab2945..77d6c767f 100644
--- a/dom/base/test/test_ipc_messagemanager_blob.html
+++ b/dom/base/test/test_ipc_messagemanager_blob.html
@@ -14,8 +14,7 @@
SimpleTest.waitForExplicitFinish();
- const childFrameURL =
- "data:text/html,<!DOCTYPE HTML><html><body></body></html>";
+ const childFrameURL = "file_ipc_messagemanager_blob.html";
function childFrameScript() {
"use strict";
diff --git a/dom/base/test/test_x-frame-options.html b/dom/base/test/test_x-frame-options.html
index 8e24d8a78..a0c7acdc3 100644
--- a/dom/base/test/test_x-frame-options.html
+++ b/dom/base/test/test_x-frame-options.html
@@ -147,7 +147,11 @@ var testFrameInDataURI = function() {
SimpleTest.waitForExplicitFinish();
// load the test harness
-document.getElementById("harness").src = "file_x-frame-options_main.html";
+SpecialPowers.pushPrefEnv({
+ "set": [["security.data_uri.block_toplevel_data_uri_navigations", false],]
+}, function() {
+ document.getElementById("harness").src = "file_x-frame-options_main.html";
+});
</script>
</pre>
diff --git a/dom/browser-element/mochitest/browserElementTestHelpers.js b/dom/browser-element/mochitest/browserElementTestHelpers.js
index 004b25333..8df1476ac 100644
--- a/dom/browser-element/mochitest/browserElementTestHelpers.js
+++ b/dom/browser-element/mochitest/browserElementTestHelpers.js
@@ -84,6 +84,10 @@ const browserElementTestHelpers = {
this.unlockTestReady.bind(this));
},
+ allowTopLevelDataURINavigation: function() {
+ this._setPref("security.data_uri.block_toplevel_data_uri_navigations", false);
+ },
+
_observers: [],
// This function is a wrapper which lets you register an observer to one of
diff --git a/dom/browser-element/mochitest/browserElement_BrowserWindowResize.js b/dom/browser-element/mochitest/browserElement_BrowserWindowResize.js
index 420b4bc34..65a777861 100644
--- a/dom/browser-element/mochitest/browserElement_BrowserWindowResize.js
+++ b/dom/browser-element/mochitest/browserElement_BrowserWindowResize.js
@@ -7,6 +7,7 @@
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
browserElementTestHelpers.addPermission();
+browserElementTestHelpers.allowTopLevelDataURINavigation();
function runTest() {
var srcResizeTo = "data:text/html, \
diff --git a/dom/browser-element/mochitest/browserElement_Close.js b/dom/browser-element/mochitest/browserElement_Close.js
index 57bdf384d..103805404 100644
--- a/dom/browser-element/mochitest/browserElement_Close.js
+++ b/dom/browser-element/mochitest/browserElement_Close.js
@@ -7,6 +7,7 @@
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
browserElementTestHelpers.addPermission();
+browserElementTestHelpers.allowTopLevelDataURINavigation();
function runTest() {
var iframe = document.createElement('iframe');
diff --git a/dom/browser-element/mochitest/browserElement_ContextmenuEvents.js b/dom/browser-element/mochitest/browserElement_ContextmenuEvents.js
index 66aa8e015..a8c361ebd 100644
--- a/dom/browser-element/mochitest/browserElement_ContextmenuEvents.js
+++ b/dom/browser-element/mochitest/browserElement_ContextmenuEvents.js
@@ -4,6 +4,7 @@ SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
browserElementTestHelpers.setClipboardPlainTextOnlyPref(false);
browserElementTestHelpers.addPermission();
+browserElementTestHelpers.allowTopLevelDataURINavigation();
var audioUrl = 'http://mochi.test:8888/tests/dom/browser-element/mochitest/audio.ogg';
var videoUrl = 'http://mochi.test:8888/tests/dom/browser-element/mochitest/short-video.ogv';
diff --git a/dom/browser-element/mochitest/browserElement_CopyPaste.js b/dom/browser-element/mochitest/browserElement_CopyPaste.js
index b23feef59..97a37be8b 100644
--- a/dom/browser-element/mochitest/browserElement_CopyPaste.js
+++ b/dom/browser-element/mochitest/browserElement_CopyPaste.js
@@ -9,6 +9,7 @@ SimpleTest.requestFlakyTimeout("untriaged");
browserElementTestHelpers.setEnabledPref(true);
browserElementTestHelpers.setupAccessibleCaretPref();
browserElementTestHelpers.addPermission();
+browserElementTestHelpers.allowTopLevelDataURINavigation();
const { Services } = SpecialPowers.Cu.import('resource://gre/modules/Services.jsm');
var gTextarea = null;
diff --git a/dom/browser-element/mochitest/browserElement_DataURI.js b/dom/browser-element/mochitest/browserElement_DataURI.js
index f57f4566a..d31678f89 100644
--- a/dom/browser-element/mochitest/browserElement_DataURI.js
+++ b/dom/browser-element/mochitest/browserElement_DataURI.js
@@ -7,6 +7,7 @@
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
browserElementTestHelpers.addPermission();
+browserElementTestHelpers.allowTopLevelDataURINavigation();
function runTest() {
var iframe1 = document.createElement('iframe');
diff --git a/dom/browser-element/mochitest/browserElement_Iconchange.js b/dom/browser-element/mochitest/browserElement_Iconchange.js
index 367a2de15..283331d3c 100644
--- a/dom/browser-element/mochitest/browserElement_Iconchange.js
+++ b/dom/browser-element/mochitest/browserElement_Iconchange.js
@@ -7,6 +7,7 @@
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
browserElementTestHelpers.addPermission();
+browserElementTestHelpers.allowTopLevelDataURINavigation();
function createHtml(link) {
return 'data:text/html,<html><head>' + link + '<body></body></html>';
diff --git a/dom/browser-element/mochitest/browserElement_Manifestchange.js b/dom/browser-element/mochitest/browserElement_Manifestchange.js
index 22cf8fe7c..5b3733d14 100644
--- a/dom/browser-element/mochitest/browserElement_Manifestchange.js
+++ b/dom/browser-element/mochitest/browserElement_Manifestchange.js
@@ -7,6 +7,7 @@
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
browserElementTestHelpers.addPermission();
+browserElementTestHelpers.allowTopLevelDataURINavigation();
function createHtml(manifest) {
return 'data:text/html,<html xmlns:xml="http://www.w3.org/XML/1998/namespace"><head>' + manifest + '<body></body></html>';
diff --git a/dom/browser-element/mochitest/browserElement_Metachange.js b/dom/browser-element/mochitest/browserElement_Metachange.js
index 7789a3e18..53c8d2397 100644
--- a/dom/browser-element/mochitest/browserElement_Metachange.js
+++ b/dom/browser-element/mochitest/browserElement_Metachange.js
@@ -7,6 +7,7 @@
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
browserElementTestHelpers.addPermission();
+browserElementTestHelpers.allowTopLevelDataURINavigation();
function createHtml(meta) {
return 'data:text/html,<html xmlns:xml="http://www.w3.org/XML/1998/namespace"><head>' + meta + '<body></body></html>';
diff --git a/dom/browser-element/mochitest/browserElement_Opensearch.js b/dom/browser-element/mochitest/browserElement_Opensearch.js
index 8df44d2a9..5762e6f0e 100644
--- a/dom/browser-element/mochitest/browserElement_Opensearch.js
+++ b/dom/browser-element/mochitest/browserElement_Opensearch.js
@@ -7,6 +7,7 @@
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
browserElementTestHelpers.addPermission();
+browserElementTestHelpers.allowTopLevelDataURINavigation();
function createHtml(link) {
return 'data:text/html,<html><head>' + link + '<body></body></html>';
diff --git a/dom/browser-element/mochitest/browserElement_PromptCheck.js b/dom/browser-element/mochitest/browserElement_PromptCheck.js
index d6edde09f..952f4468e 100644
--- a/dom/browser-element/mochitest/browserElement_PromptCheck.js
+++ b/dom/browser-element/mochitest/browserElement_PromptCheck.js
@@ -13,6 +13,7 @@
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
browserElementTestHelpers.addPermission();
+browserElementTestHelpers.allowTopLevelDataURINavigation();
function runTest()
{
diff --git a/dom/browser-element/mochitest/browserElement_PromptConfirm.js b/dom/browser-element/mochitest/browserElement_PromptConfirm.js
index c01836a25..b920a6d26 100644
--- a/dom/browser-element/mochitest/browserElement_PromptConfirm.js
+++ b/dom/browser-element/mochitest/browserElement_PromptConfirm.js
@@ -11,6 +11,7 @@
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
browserElementTestHelpers.addPermission();
+browserElementTestHelpers.allowTopLevelDataURINavigation();
function runTest() {
var iframe = document.createElement('iframe');
diff --git a/dom/browser-element/mochitest/browserElement_RemoveBrowserElement.js b/dom/browser-element/mochitest/browserElement_RemoveBrowserElement.js
index 583d58734..3ab206388 100644
--- a/dom/browser-element/mochitest/browserElement_RemoveBrowserElement.js
+++ b/dom/browser-element/mochitest/browserElement_RemoveBrowserElement.js
@@ -9,6 +9,7 @@
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
browserElementTestHelpers.addPermission();
+browserElementTestHelpers.allowTopLevelDataURINavigation();
function runTest() {
var iframe = document.createElement('iframe');
diff --git a/dom/browser-element/mochitest/browserElement_ScrollEvent.js b/dom/browser-element/mochitest/browserElement_ScrollEvent.js
index 06dc91b86..5230c524a 100644
--- a/dom/browser-element/mochitest/browserElement_ScrollEvent.js
+++ b/dom/browser-element/mochitest/browserElement_ScrollEvent.js
@@ -7,6 +7,7 @@
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
browserElementTestHelpers.addPermission();
+browserElementTestHelpers.allowTopLevelDataURINavigation();
function runTest() {
var iframe = document.createElement('iframe');
diff --git a/dom/browser-element/mochitest/browserElement_Titlechange.js b/dom/browser-element/mochitest/browserElement_Titlechange.js
index 78c939ad8..145e9baa8 100644
--- a/dom/browser-element/mochitest/browserElement_Titlechange.js
+++ b/dom/browser-element/mochitest/browserElement_Titlechange.js
@@ -7,6 +7,7 @@
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
browserElementTestHelpers.addPermission();
+browserElementTestHelpers.allowTopLevelDataURINavigation();
function runTest() {
var iframe1 = document.createElement('iframe');
diff --git a/dom/browser-element/mochitest/browserElement_TopBarrier.js b/dom/browser-element/mochitest/browserElement_TopBarrier.js
index 3bd68854c..186622b33 100644
--- a/dom/browser-element/mochitest/browserElement_TopBarrier.js
+++ b/dom/browser-element/mochitest/browserElement_TopBarrier.js
@@ -7,6 +7,7 @@
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
browserElementTestHelpers.addPermission();
+browserElementTestHelpers.allowTopLevelDataURINavigation();
var iframe;
function runTest() {
diff --git a/dom/html/test/test_fullscreen-api-race.html b/dom/html/test/test_fullscreen-api-race.html
index 03c6c6da3..6664e2ab5 100644
--- a/dom/html/test/test_fullscreen-api-race.html
+++ b/dom/html/test/test_fullscreen-api-race.html
@@ -35,7 +35,9 @@ addLoadEvent(function () {
SpecialPowers.pushPrefEnv({
"set": [
["full-screen-api.unprefix.enabled", true],
- ["full-screen-api.allow-trusted-requests-only", false]
+ ["full-screen-api.allow-trusted-requests-only", false],
+ // Use legacy data: URI behavior to run test.
+ ["security.data_uri.block_toplevel_data_uri_navigations", false]
]
}, next);
});
diff --git a/dom/ipc/tests/test_cpow_cookies.html b/dom/ipc/tests/test_cpow_cookies.html
index 1e55d3878..d8f87cced 100644
--- a/dom/ipc/tests/test_cpow_cookies.html
+++ b/dom/ipc/tests/test_cpow_cookies.html
@@ -81,7 +81,8 @@
["dom.ipc.browser_frames.oop_by_default", true],
["dom.mozBrowserFramesEnabled", true],
["network.disable.ipc.security", true],
- ["browser.pagethumbnails.capturing_disabled", true]
+ ["browser.pagethumbnails.capturing_disabled", true],
+ ["security.data_uri.block_toplevel_data_uri_navigations", false],
]
}, runTests);
});
diff --git a/dom/plugins/test/mochitest/test_pluginstream_err.html b/dom/plugins/test/mochitest/test_pluginstream_err.html
index 0ac2a5efc..79f06154c 100644
--- a/dom/plugins/test/mochitest/test_pluginstream_err.html
+++ b/dom/plugins/test/mochitest/test_pluginstream_err.html
@@ -13,7 +13,7 @@ Tests for plugin stream error conditions.
<link rel="stylesheet" type="text/css"
href="/tests/SimpleTest/test.css" />
</head>
-<body onload="runNextTest()">
+<body onload="startTests()">
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=517078">
Mozilla Bug 517078</a> - Plugin Stream Error Tests
<p id="display"></p>
@@ -158,6 +158,12 @@ function continueTest() {
index++;
}
+function startTests() {
+ SpecialPowers.pushPrefEnv({"set": [
+ ["security.data_uri.block_toplevel_data_uri_navigations", false],
+ ]}, runNextTest);
+}
+
</script>
</div>
</body>
diff --git a/dom/tests/mochitest/bugs/test_resize_move_windows.html b/dom/tests/mochitest/bugs/test_resize_move_windows.html
index 0762e9231..f84b4fde8 100644
--- a/dom/tests/mochitest/bugs/test_resize_move_windows.html
+++ b/dom/tests/mochitest/bugs/test_resize_move_windows.html
@@ -312,7 +312,10 @@ function checkChangeIsEnabled(aWindow, aNext)
.then(aNext);
}
-SpecialPowers.pushPrefEnv({"set": [["dom.disable_window_move_resize", false]]}, function() {
+SpecialPowers.pushPrefEnv({
+ "set": [["dom.disable_window_move_resize", false],
+ ["security.data_uri.block_toplevel_data_uri_navigations", false],]},
+ function() {
SimpleTest.waitForFocus(function() {
if (screen.width <= 200 || screen.height <= 200) {
todo(false, "The screen needs to be bigger than 200px*200px to run this test.");
diff --git a/editor/libeditor/tests/browser.ini b/editor/libeditor/tests/browser.ini
index 249f59aa8..bd234fc8d 100644
--- a/editor/libeditor/tests/browser.ini
+++ b/editor/libeditor/tests/browser.ini
@@ -1,6 +1,8 @@
[browser_bug527935.js]
skip-if = toolkit == 'android'
-support-files = bug527935.html
+support-files =
+ bug527935.html
+ bug527935_2.html
[browser_bug629172.js]
skip-if = toolkit == 'android'
support-files = bug629172.html
diff --git a/editor/libeditor/tests/bug527935.html b/editor/libeditor/tests/bug527935.html
index 4bfa1bac2..1731734d2 100644
--- a/editor/libeditor/tests/bug527935.html
+++ b/editor/libeditor/tests/bug527935.html
@@ -3,7 +3,7 @@
<body>
<div id="content">
<iframe id="formTarget" name="formTarget"></iframe>
- <form action="data:text/html," target="formTarget">
+ <form action="bug527935_2.html" target="formTarget">
<input name="test" id="initValue"><input type="submit">
</form>
</div>
diff --git a/editor/libeditor/tests/bug527935_2.html b/editor/libeditor/tests/bug527935_2.html
new file mode 100644
index 000000000..96af0721d
--- /dev/null
+++ b/editor/libeditor/tests/bug527935_2.html
@@ -0,0 +1 @@
+<html><body>dummy page</body></html>
diff --git a/editor/libeditor/tests/file_bug635636_2.html b/editor/libeditor/tests/file_bug635636_2.html
new file mode 100644
index 000000000..bf0c8101f
--- /dev/null
+++ b/editor/libeditor/tests/file_bug635636_2.html
@@ -0,0 +1 @@
+<html><body>2</body></html>
diff --git a/editor/libeditor/tests/file_bug966155.html b/editor/libeditor/tests/file_bug966155.html
new file mode 100644
index 000000000..04f55a918
--- /dev/null
+++ b/editor/libeditor/tests/file_bug966155.html
@@ -0,0 +1 @@
+<input><iframe onload="contentDocument.designMode = 'on';">
diff --git a/editor/libeditor/tests/file_bug966552.html b/editor/libeditor/tests/file_bug966552.html
new file mode 100644
index 000000000..5061c2e40
--- /dev/null
+++ b/editor/libeditor/tests/file_bug966552.html
@@ -0,0 +1 @@
+<body onload="document.designMode='on'">test</body>
diff --git a/editor/libeditor/tests/test_bug966155.html b/editor/libeditor/tests/test_bug966155.html
index 524b15d69..1e7ed67f3 100644
--- a/editor/libeditor/tests/test_bug966155.html
+++ b/editor/libeditor/tests/test_bug966155.html
@@ -18,13 +18,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=966155
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
-addLoadEvent(function() {
- var win = window.open("data:text/html,<input><iframe onload=\"contentDocument.designMode = 'on';\">", "", "test-966155");
- win.addEventListener("load", function onLoad() {
- win.removeEventListener("load", onLoad);
- runTest(win);
- }, false);
-});
+var win = window.open("file_bug966155.html", "", "test-966155");
+win.addEventListener("load", function() {
+ runTest(win);
+}, {once: true});
function runTest(win) {
SimpleTest.waitForFocus(function() {
@@ -38,14 +35,14 @@ function runTest(win) {
"test".split("").forEach(function(letter) {
synthesizeKey(letter, {}, win);
});
- is(iframeDoc.body.textContent, "test", "entered the text");
+ is(iframeDoc.body.textContent.trim(), "test", "entered the text");
// focus the input box
input.focus();
// press tab
synthesizeKey("VK_TAB", {}, win);
// Now press Ctrl+Backspace
synthesizeKey("VK_BACK_SPACE", {ctrlKey: true}, win);
- is(iframeDoc.body.textContent, "", "deleted the text");
+ is(iframeDoc.body.textContent.trim(), "", "deleted the text");
win.close();
SimpleTest.finish();
}, win);
diff --git a/editor/libeditor/tests/test_bug966552.html b/editor/libeditor/tests/test_bug966552.html
index 3d0ec5fe3..e18883aad 100644
--- a/editor/libeditor/tests/test_bug966552.html
+++ b/editor/libeditor/tests/test_bug966552.html
@@ -18,13 +18,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=966552
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
-addLoadEvent(function() {
- var win = window.open("data:text/html,<body onload=\"document.designMode='on'\">test</body>", "", "test-966552");
- win.addEventListener("load", function onLoad() {
- win.removeEventListener("load", onLoad);
- runTest(win);
- }, false);
-});
+var win = window.open("file_bug966552.html", "", "test-966552");
+win.addEventListener("load", function() {
+ runTest(win);
+}, {once: true});
function runTest(win) {
SimpleTest.waitForFocus(function() {
@@ -33,7 +30,7 @@ function runTest(win) {
doc.body.focus();
sel.collapse(doc.body.firstChild, 2);
synthesizeKey("VK_BACK_SPACE", {ctrlKey: true}, win);
- is(doc.body.textContent, "st");
+ is(doc.body.textContent.trim(), "st");
win.close();
SimpleTest.finish();
}, win);
diff --git a/testing/talos/talos/test.py b/testing/talos/talos/test.py
index 0de9f19bb..dc1306b8e 100644
--- a/testing/talos/talos/test.py
+++ b/testing/talos/talos/test.py
@@ -194,6 +194,7 @@ class tpaint(TsBase):
tpmozafterpaint = True
filters = filter.ignore_first.prepare(5) + filter.median.prepare()
unit = 'ms'
+ preferences = {'security.data_uri.block_toplevel_data_uri_navigations': False}
@register_test()
diff --git a/testing/web-platform/tests/websockets/unload-a-document/001-1.html b/testing/web-platform/tests/websockets/unload-a-document/001-1.html
index 214246b2e..926a68a06 100644
--- a/testing/web-platform/tests/websockets/unload-a-document/001-1.html
+++ b/testing/web-platform/tests/websockets/unload-a-document/001-1.html
@@ -22,7 +22,7 @@ t.step(function() {
}), 1000);
controller.navigate();
})
- ws.onerror = ws.onmessage = ws.onclose = t.step_func(function(e) {assert_unreached("Got unexpected event " + e.type)});
+ ws.onerror = ws.onmessage = t.step_func(e => assert_unreached("Got unexpected event " + e.type));
}
});
</script>
diff --git a/testing/web-platform/tests/websockets/unload-a-document/001-2.html b/testing/web-platform/tests/websockets/unload-a-document/001-2.html
new file mode 100644
index 000000000..24c419ce1
--- /dev/null
+++ b/testing/web-platform/tests/websockets/unload-a-document/001-2.html
@@ -0,0 +1,4 @@
+<!doctype html>
+<title>WebSockets: navigating top-level browsing context</title>
+<body onload="history.back()"></body>
+</html>
diff --git a/testing/web-platform/tests/websockets/unload-a-document/001.html b/testing/web-platform/tests/websockets/unload-a-document/001.html
index d949b6eba..56e883c64 100644
--- a/testing/web-platform/tests/websockets/unload-a-document/001.html
+++ b/testing/web-platform/tests/websockets/unload-a-document/001.html
@@ -20,6 +20,6 @@ t.step(function() {
});
});
navigate = t.step_func(function() {
- w.location = 'data:text/html,<body onload="history.back()">';
+ w.location = w.location.href.replace("001-1.html", "001-2.html");
});
</script>
diff --git a/testing/web-platform/tests/websockets/unload-a-document/002-1.html b/testing/web-platform/tests/websockets/unload-a-document/002-1.html
index 86a852b10..52f188fa4 100644
--- a/testing/web-platform/tests/websockets/unload-a-document/002-1.html
+++ b/testing/web-platform/tests/websockets/unload-a-document/002-1.html
@@ -28,7 +28,7 @@ t.step(function() {
controller.navigate();
});
})
- ws.onerror = ws.onmessage = ws.onclose = t.step_func(function(e) {assert_unreached("Got unexpected event " + e.type)});
+ ws.onerror = ws.onmessage = t.step_func(e => assert_unreached("Got unexpected event " + e.type));
}
});
</script>
diff --git a/testing/web-platform/tests/websockets/unload-a-document/002-2.html b/testing/web-platform/tests/websockets/unload-a-document/002-2.html
new file mode 100644
index 000000000..9a246a1dd
--- /dev/null
+++ b/testing/web-platform/tests/websockets/unload-a-document/002-2.html
@@ -0,0 +1,4 @@
+<!doctype html>
+<title>WebSockets: navigating top-level browsing context with closed websocket</title>
+<body onload="history.back()"></body>
+</html>
diff --git a/testing/web-platform/tests/websockets/unload-a-document/002.html b/testing/web-platform/tests/websockets/unload-a-document/002.html
index df35192d6..03764c345 100644
--- a/testing/web-platform/tests/websockets/unload-a-document/002.html
+++ b/testing/web-platform/tests/websockets/unload-a-document/002.html
@@ -21,6 +21,6 @@ t.step(function() {
});
});
navigate = t.step_func(function() {
- w.location = 'data:text/html,<body onload="history.back()">';
+ w.location = w.location.href.replace("002-1.html", "002-2.html");
});
</script>
diff --git a/toolkit/components/printing/tests/browser.ini b/toolkit/components/printing/tests/browser.ini
index 88d6bb454..5f2867189 100644
--- a/toolkit/components/printing/tests/browser.ini
+++ b/toolkit/components/printing/tests/browser.ini
@@ -1,2 +1,5 @@
[browser_page_change_print_original.js]
+support-files =
+ file_page_change_print_original_1.html
+ file_page_change_print_original_2.html
skip-if = os == "mac"
diff --git a/toolkit/components/printing/tests/browser_page_change_print_original.js b/toolkit/components/printing/tests/browser_page_change_print_original.js
index 5990a486b..864150451 100644
--- a/toolkit/components/printing/tests/browser_page_change_print_original.js
+++ b/toolkit/components/printing/tests/browser_page_change_print_original.js
@@ -3,8 +3,11 @@
* and we re-initialize print preview (e.g. by changing page orientation),
* we still show (and will therefore print) the original contents.
*/
+const TEST_PATH = getRootDirectory(gTestPath)
+ .replace("chrome://mochitests/content", "http://example.com");
+
add_task(function* pp_after_orientation_change() {
- const DATA_URI = `data:text/html,<script>window.onafterprint = function() { setTimeout("window.location = 'data:text/plain,REPLACED PAGE!'", 0); }</script><pre>INITIAL PAGE</pre>`;
+ const URI = TEST_PATH + "file_page_change_print_original_1.html";
// Can only do something if we have a print preview UI:
if (AppConstants.platform != "win" && AppConstants.platform != "linux") {
ok(true, "Can't test if there's no print preview.");
@@ -12,7 +15,7 @@ add_task(function* pp_after_orientation_change() {
}
// Ensure we get a browserStopped for this browser
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, DATA_URI, false, true);
+ let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, URI, false, true);
let browserToPrint = tab.linkedBrowser;
let ppBrowser = PrintPreviewListener.getPrintPreviewBrowser();
@@ -26,7 +29,7 @@ add_task(function* pp_after_orientation_change() {
// Assert that we are showing the original page
yield ContentTask.spawn(ppBrowser, null, function* () {
- is(content.document.body.textContent, "INITIAL PAGE", "Should have initial page print previewed.");
+ is(content.document.body.textContent.trim(), "INITIAL PAGE", "Should have initial page print previewed.");
});
yield originalTabNavigated;
@@ -43,12 +46,12 @@ add_task(function* pp_after_orientation_change() {
// Check that we're still showing the original page.
yield ContentTask.spawn(ppBrowser, null, function* () {
- is(content.document.body.textContent, "INITIAL PAGE", "Should still have initial page print previewed.");
+ is(content.document.body.textContent.trim(), "INITIAL PAGE", "Should still have initial page print previewed.");
});
// Check that the other tab is definitely showing the new page:
yield ContentTask.spawn(browserToPrint, null, function* () {
- is(content.document.body.textContent, "REPLACED PAGE!", "Original page should have changed.");
+ is(content.document.body.textContent.trim(), "REPLACED PAGE!", "Original page should have changed.");
});
PrintUtils.exitPrintPreview();
diff --git a/toolkit/components/printing/tests/file_page_change_print_original_1.html b/toolkit/components/printing/tests/file_page_change_print_original_1.html
new file mode 100644
index 000000000..76e3be137
--- /dev/null
+++ b/toolkit/components/printing/tests/file_page_change_print_original_1.html
@@ -0,0 +1,8 @@
+<script>
+window.onafterprint = function() {
+ setTimeout(function() {
+ window.location = "file_page_change_print_original_2.html"
+ }, 0);
+}
+</script>
+<pre>INITIAL PAGE</pre>
diff --git a/toolkit/components/printing/tests/file_page_change_print_original_2.html b/toolkit/components/printing/tests/file_page_change_print_original_2.html
new file mode 100644
index 000000000..44f33281c
--- /dev/null
+++ b/toolkit/components/printing/tests/file_page_change_print_original_2.html
@@ -0,0 +1 @@
+REPLACED PAGE!
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_datauri.js b/toolkit/mozapps/extensions/test/xpinstall/browser_datauri.js
index 917f2465d..b24bce4b5 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_datauri.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_datauri.js
@@ -13,6 +13,13 @@ function setup_redirect(aSettings) {
}
function test() {
+ waitForExplicitFinish();
+ SpecialPowers.pushPrefEnv({
+ "set": [["security.data_uri.block_toplevel_data_uri_navigations", false]]
+ }, runTest);
+}
+
+function runTest() {
Harness.installOriginBlockedCallback = install_blocked;
Harness.installsCompletedCallback = finish_test;
Harness.setup();
@@ -33,4 +40,5 @@ function finish_test(count) {
gBrowser.removeCurrentTab();
Harness.finish();
+ finish();
}