diff --git a/extensions/cookie/test/file_testloadflags.js b/extensions/cookie/test/file_testloadflags.js index 47c298d7b3e..e0149be23d2 100644 --- a/extensions/cookie/test/file_testloadflags.js +++ b/extensions/cookie/test/file_testloadflags.js @@ -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;