Bug 1283759 - Pass securityFlag to newChannel for packaged_app tests r=valentin
authorChristoph Kerschbaumer <ckerschb@christophkerschbaumer.com>
Fri, 01 Jul 2016 09:27:37 +0200
changeset 303419 733e6ac3ee54688ebb80acea0aa23820c7527ec2
parent 303418 4306097418bfa74f88ac2b922e4cab0eb0fc6f35
child 303420 6bf1de063f92f982cc1e1ef075cadb9eb17ab9af
push id30388
push usercbook@mozilla.com
push dateSat, 02 Jul 2016 09:15:23 +0000
treeherdermozilla-central@39dffbba7642 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin
bugs1283759
milestone50.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 1283759 - Pass securityFlag to newChannel for packaged_app tests r=valentin
netwerk/test/unit/test_packaged_app_bug1214079.js
netwerk/test/unit/test_packaged_app_service.js
netwerk/test/unit/test_packaged_app_service_paths.js
--- a/netwerk/test/unit/test_packaged_app_bug1214079.js
+++ b/netwerk/test/unit/test_packaged_app_bug1214079.js
@@ -144,16 +144,17 @@ function getChannelForURL(url) {
   let uri = createURI(url);
   let ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
               .getService(Ci.nsIScriptSecurityManager);
   let principal = ssm.createCodebasePrincipal(uri, {});
   let tmpChannel =
     NetUtil.newChannel({
       uri: url,
       loadingPrincipal: principal,
+      securityFlags: Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
       contentPolicyType: Ci.nsIContentPolicy.TYPE_OTHER
     });
 
   tmpChannel.notificationCallbacks =
     new LoadContextCallback(principal.appId,
                             principal.isInIsolatedMozBrowserElement,
                             false,
                             false);
--- a/netwerk/test/unit/test_packaged_app_service.js
+++ b/netwerk/test/unit/test_packaged_app_service.js
@@ -72,16 +72,17 @@ function getChannelForURL(url, notificat
   let uri = createURI(url);
   let ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
               .getService(Ci.nsIScriptSecurityManager);
   let principal = ssm.createCodebasePrincipal(uri, {});
   let tmpChannel =
     NetUtil.newChannel({
       uri: url,
       loadingPrincipal: principal,
+      securityFlags: Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
       contentPolicyType: Ci.nsIContentPolicy.TYPE_OTHER
     });
 
   if (notificationCallbacks) {
     tmpChannel.loadInfo.originAttributes = { appId: 1024,
                                              inIsolatedMozBrowser: false
                                            };
     // Use custom notificationCallbacks if any.
--- a/netwerk/test/unit/test_packaged_app_service_paths.js
+++ b/netwerk/test/unit/test_packaged_app_service_paths.js
@@ -16,16 +16,17 @@ function getChannelForURL(url) {
   let uri = createURI(url);
   let ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
               .getService(Ci.nsIScriptSecurityManager);
   let principal = ssm.createCodebasePrincipal(uri, {});
   let tmpChannel =
     NetUtil.newChannel({
       uri: url,
       loadingPrincipal: principal,
+      securityFlags: Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
       contentPolicyType: Ci.nsIContentPolicy.TYPE_OTHER
     });
 
   tmpChannel.notificationCallbacks =
     new LoadContextCallback(principal.appId,
                             principal.isInIsolatedMozBrowserElement,
                             false,
                             false);