Bug 1380282: rewrite browser_ext_webRequest.js for the new data: URI inheritance model. r=kmag
authorYoshi Huang <allstars.chh@mozilla.com>
Wed, 12 Jul 2017 15:53:59 +0800
changeset 418334 9dc2a03c3574769c85305450afedb19672960f5e
parent 418333 c869a61f3eab89c40444689a9685896b42a2b19d
child 418335 78ea9fac3a585da334584cd8f538e4063d159b3a
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1380282
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1380282: rewrite browser_ext_webRequest.js for the new data: URI inheritance model. r=kmag When we turn on the pref security.data_uri.unique_opaque_origin, this test failed because data: URI is treated as cross origin. So I replace the data: URI as a seperate xul.
toolkit/modules/HiddenFrame.jsm
toolkit/modules/jar.mn
toolkit/modules/moz.build
toolkit/modules/win.xul
--- a/toolkit/modules/HiddenFrame.jsm
+++ b/toolkit/modules/HiddenFrame.jsm
@@ -7,17 +7,17 @@
 this.EXPORTED_SYMBOLS = ["HiddenFrame"];
 
 const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
 
 Cu.import("resource://gre/modules/PromiseUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
-const XUL_PAGE = "data:application/vnd.mozilla.xul+xml;charset=utf-8,<window%20id='win'/>";
+const XUL_PAGE = "chrome://global/content/win.xul";
 
 const gAllHiddenFrames = new WeakSet();
 
 let cleanupRegistered = false;
 function ensureCleanupRegistered() {
   if (!cleanupRegistered) {
     cleanupRegistered = true;
     Services.obs.addObserver(function() {
new file mode 100644
--- /dev/null
+++ b/toolkit/modules/jar.mn
@@ -0,0 +1,6 @@
+# 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/.
+
+toolkit.jar:
+  content/global/win.xul               (win.xul)
--- a/toolkit/modules/moz.build
+++ b/toolkit/modules/moz.build
@@ -307,9 +307,11 @@ for var in ('ANDROID_PACKAGE_NAME',
 for var in ('MOZ_TOOLKIT_SEARCH',
             'MOZ_SYSTEM_NSS',
             'MOZ_UPDATER',
             'MOZ_ANDROID_MOZILLA_ONLINE',
             'MOZ_SWITCHBOARD'):
     if CONFIG[var]:
         DEFINES[var] = True
 
+JAR_MANIFESTS += ['jar.mn']
+
 DEFINES['TOPOBJDIR'] = TOPOBJDIR
new file mode 100644
--- /dev/null
+++ b/toolkit/modules/win.xul
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<window id='win'/>