зеркало из https://github.com/mozilla/gecko-dev.git
Bug 537787 - Update websocket test to use SpecialPowers. r=ctalbert try: -b do -p all -u mochitests -t none
This commit is contained in:
Родитель
f0668c3546
Коммит
2694e83b1c
|
@ -129,15 +129,11 @@ function CreateTestWS(ws_location, ws_protocol)
|
|||
|
||||
function forcegc()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
Components.utils.forceGC();
|
||||
var wu = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||
.getInterface(Components.interfaces.nsIDOMWindowUtils);
|
||||
wu.garbageCollect();
|
||||
SpecialPowers.forceGC();
|
||||
SpecialPowers.gc();
|
||||
setTimeout(function()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
wu.garbageCollect();
|
||||
SpecialPowers.gc();
|
||||
}, 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,11 +22,8 @@ var params = ["protocol", "resource", "origin", "end"];
|
|||
var results = ["test", "/tests/content/base/test/file_ws_basic_tests", "http://mochi.test:8888", "end"];
|
||||
|
||||
function forcegc(){
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
Components.utils.forceGC();
|
||||
var wu = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||
.getInterface(Components.interfaces.nsIDOMWindowUtils);
|
||||
wu.garbageCollect();
|
||||
SpecialPowers.forceGC();
|
||||
SpecialPowers.gc();
|
||||
}
|
||||
|
||||
function finishWSTest() {
|
||||
|
|
|
@ -212,6 +212,10 @@ SpecialPowers.prototype = {
|
|||
this.DOMWindowUtils.garbageCollect();
|
||||
},
|
||||
|
||||
forceGC: function() {
|
||||
Components.utils.forceGC();
|
||||
},
|
||||
|
||||
hasContentProcesses: function() {
|
||||
try {
|
||||
var rt = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime);
|
||||
|
|
Загрузка…
Ссылка в новой задаче