Bug 1312954 - Part 12: Update speculativeConnect to speculativeConnect2 for test_speculative_connect.js. r=mayhemer

This commit is contained in:
Tim Huang 2017-02-02 22:20:00 -05:00
Родитель 42a2c99db5
Коммит 4b8d34bc82
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -143,9 +143,13 @@ TestFailedStreamCallback.prototype = {
*/
function test_speculative_connect() {
serv = new TestServer();
var ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
.getService(Ci.nsIScriptSecurityManager);
var URI = ios.newURI("http://localhost:" + serv.listener.port + "/just/a/test");
var principal = ssm.createCodebasePrincipal(URI, {});
ios.QueryInterface(Ci.nsISpeculativeConnect)
.speculativeConnect(URI, null);
.speculativeConnect2(URI, principal, null);
}
/* Speculative connections should not be allowed for hosts with local IP