зеркало из https://github.com/mozilla/pjs.git
Bug 559998. Add some debug output to diagnose random orange.
This commit is contained in:
Родитель
eeea9e8083
Коммит
ffe465e1c5
|
@ -53,6 +53,8 @@ function finishTest()
|
|||
function obs () {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
ok(true, "adding observer");
|
||||
|
||||
this.window = window;
|
||||
this.os = Components.classes["@mozilla.org/observer-service;1"]
|
||||
.getService(Components.interfaces.nsIObserverService);
|
||||
|
@ -65,8 +67,24 @@ obs.prototype = {
|
|||
this.window.netscape.security
|
||||
.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
ok(true, "theSubject " + theSubject);
|
||||
ok(true, "theTopic " + theTopic);
|
||||
ok(true, "theData " + theData);
|
||||
|
||||
var channel = theSubject.QueryInterface(
|
||||
this.window.Components.interfaces.nsIHttpChannel);
|
||||
ok(true, "channel " + channel);
|
||||
try {
|
||||
ok(true, "channel.URI " + channel.URI);
|
||||
ok(true, "channel.URI.spec " + channel.URI.spec);
|
||||
channel.visitRequestHeaders({
|
||||
visitHeader: function(aHeader, aValue) {
|
||||
ok(true, aHeader + ": " + aValue);
|
||||
}});
|
||||
} catch (err) {
|
||||
ok(false, "catch error " + err);
|
||||
}
|
||||
|
||||
this.window.isnot(channel.getRequestHeader("Cookie").indexOf("oh=hai"), -1,
|
||||
"cookie 'oh=hai' is in header for " + channel.URI.spec);
|
||||
++gHeaders;
|
||||
|
@ -76,6 +94,8 @@ obs.prototype = {
|
|||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
ok(true, "removing observer");
|
||||
|
||||
this.os.removeObserver(this, "http-on-modify-request");
|
||||
this.os = null;
|
||||
this.window = null;
|
||||
|
|
Загрузка…
Ссылка в новой задаче