From ffe465e1c5ff2faab9dd458df77d2f7f013ee26a Mon Sep 17 00:00:00 2001 From: Timothy Nikkel Date: Thu, 29 Apr 2010 20:15:44 -0500 Subject: [PATCH] Bug 559998. Add some debug output to diagnose random orange. --- extensions/cookie/test/file_testloadflags.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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;