Revert part of bug 460548, increasing the leak to 75000 again.
[wine-gecko.git] / extensions / cookie / test / browser_test_favicon.js
blob4c1ae877c309f70b2a6d0796d4a8725d9bb67c14
1 // tests third party cookie blocking using a favicon load directly from chrome.
2 // in this case, the docshell of the channel is chrome, not content; thus
3 // the cookie should be considered third party.
5 function test() {
6 waitForExplicitFinish();
8 var prefs = Components.classes["@mozilla.org/preferences-service;1"]
9 .getService(Components.interfaces.nsIPrefBranch);
10 prefs.setIntPref("network.cookie.cookieBehavior", 1);
12 var o = new obs();
14 // kick off a favicon load
15 PageProxySetIcon("http://example.org/tests/extensions/cookie/test/image1.png");
18 function obs () {
19 this.os = Components.classes["@mozilla.org/observer-service;1"]
20 .getService(Components.interfaces.nsIObserverService);
21 this.os.addObserver(this, "cookie-rejected", false);
24 obs.prototype = {
25 observe: function obs_observe (theSubject, theTopic, theData)
27 var uri = theSubject.QueryInterface(Components.interfaces.nsIURI);
28 var domain = uri.host;
30 if (domain == "example.org") {
31 ok(true, "foreign favicon cookie was blocked");
33 var prefs = Components.classes["@mozilla.org/preferences-service;1"]
34 .getService(Components.interfaces.nsIPrefBranch);
35 prefs.setIntPref("network.cookie.cookieBehavior", 0);
37 this.os.removeObserver(this, "cookie-rejected");
38 this.os = null;
40 finish();