mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1087731: Make JS callers of ios.newChannel call ios.newChannel2 in image/ (r=seth)
This commit is contained in:
parent
e868230552
commit
68f34a9814
@ -12,6 +12,7 @@ const Cu = Components.utils;
|
||||
const Cr = Components.results;
|
||||
|
||||
Cu.import("resource://testing-common/httpd.js");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
var server = new HttpServer();
|
||||
server.registerDirectory("/", do_get_file(''));
|
||||
@ -140,7 +141,12 @@ function checkSecondChannelLoad()
|
||||
do_test_pending();
|
||||
|
||||
var ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
|
||||
var channel = ioService.newChannelFromURI(uri);
|
||||
var channel = ioService.newChannelFromURI2(uri,
|
||||
null, // aLoadingNode
|
||||
Services.scriptSecurityManager.getSystemPrincipal(),
|
||||
null, // aTriggeringPrincipal
|
||||
Ci.nsILoadInfo.SEC_NORMAL,
|
||||
Ci.nsIContentPolicy.TYPE_OTHER);
|
||||
var channellistener = new ChannelListener();
|
||||
channel.asyncOpen(channellistener, null);
|
||||
|
||||
@ -164,7 +170,12 @@ function run_loadImageWithChannel_tests()
|
||||
do_test_pending();
|
||||
|
||||
var ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
|
||||
var channel = ioService.newChannelFromURI(uri);
|
||||
var channel = ioService.newChannelFromURI2(uri,
|
||||
null, // aLoadingNode
|
||||
Services.scriptSecurityManager.getSystemPrincipal(),
|
||||
null, // aTriggeringPrincipal
|
||||
Ci.nsILoadInfo.SEC_NORMAL,
|
||||
Ci.nsIContentPolicy.TYPE_OTHER);
|
||||
var channellistener = new ChannelListener();
|
||||
channel.asyncOpen(channellistener, null);
|
||||
|
||||
|
@ -53,7 +53,12 @@ var gImgPath = 'http://localhost:' + server.identity.primaryPort + '/image.png';
|
||||
|
||||
function setup_chan(path, isPrivate, callback) {
|
||||
var uri = gIoService.newURI(gImgPath, null, null);
|
||||
var chan = gIoService.newChannelFromURI(uri);
|
||||
var chan = gIoService.newChannelFromURI2(uri,
|
||||
null, // aLoadingNode
|
||||
Services.scriptSecurityManager.getSystemPrincipal(),
|
||||
null, // aTriggeringPrincipal
|
||||
Ci.nsILoadInfo.SEC_NORMAL,
|
||||
Ci.nsIContentPolicy.TYPE_OTHER);
|
||||
chan.notificationCallbacks = new NotificationCallbacks(isPrivate);
|
||||
var channelListener = new ChannelListener();
|
||||
chan.asyncOpen(channelListener, null);
|
||||
|
Loading…
Reference in New Issue
Block a user