зеркало из 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 () {
|
function obs () {
|
||||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||||
|
|
||||||
|
ok(true, "adding observer");
|
||||||
|
|
||||||
this.window = window;
|
this.window = window;
|
||||||
this.os = Components.classes["@mozilla.org/observer-service;1"]
|
this.os = Components.classes["@mozilla.org/observer-service;1"]
|
||||||
.getService(Components.interfaces.nsIObserverService);
|
.getService(Components.interfaces.nsIObserverService);
|
||||||
|
@ -65,8 +67,24 @@ obs.prototype = {
|
||||||
this.window.netscape.security
|
this.window.netscape.security
|
||||||
.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||||
|
|
||||||
|
ok(true, "theSubject " + theSubject);
|
||||||
|
ok(true, "theTopic " + theTopic);
|
||||||
|
ok(true, "theData " + theData);
|
||||||
|
|
||||||
var channel = theSubject.QueryInterface(
|
var channel = theSubject.QueryInterface(
|
||||||
this.window.Components.interfaces.nsIHttpChannel);
|
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,
|
this.window.isnot(channel.getRequestHeader("Cookie").indexOf("oh=hai"), -1,
|
||||||
"cookie 'oh=hai' is in header for " + channel.URI.spec);
|
"cookie 'oh=hai' is in header for " + channel.URI.spec);
|
||||||
++gHeaders;
|
++gHeaders;
|
||||||
|
@ -76,6 +94,8 @@ obs.prototype = {
|
||||||
{
|
{
|
||||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||||
|
|
||||||
|
ok(true, "removing observer");
|
||||||
|
|
||||||
this.os.removeObserver(this, "http-on-modify-request");
|
this.os.removeObserver(this, "http-on-modify-request");
|
||||||
this.os = null;
|
this.os = null;
|
||||||
this.window = null;
|
this.window = null;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче