Bug 823735 - Port test_cookies_privatebrowsing.js to the per-window PB APIs; r=jdm
authorAndres Hernandez <andres@appcoast.com>
Thu, 03 Jan 2013 11:54:03 -0600
changeset 117457 1c794aeaf3d82b6fe6b5fad06df41722bf19d4b4
parent 117456 3d51d7f54e5d027854e9533a4a420688198dc3be
child 117458 e9d90681e31e110eca9d4d362a2e21dca9356e8d
push id20521
push usereakhgari@mozilla.com
push dateThu, 03 Jan 2013 18:05:40 +0000
treeherdermozilla-inbound@1c794aeaf3d8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
bugs823735
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 823735 - Port test_cookies_privatebrowsing.js to the per-window PB APIs; r=jdm
extensions/cookie/test/unit/test_cookies_privatebrowsing.js
extensions/cookie/test/unit/xpcshell.ini
--- a/extensions/cookie/test/unit/test_cookies_privatebrowsing.js
+++ b/extensions/cookie/test/unit/test_cookies_privatebrowsing.js
@@ -22,28 +22,16 @@ function make_channel(url) {
   var chan = ios.newChannel(url, null, null).QueryInterface(Ci.nsIHttpChannel);
   return chan;
 }
 
 function do_run_test() {
   // Set up a profile.
   let profile = do_get_profile();
 
-  // Make sure the private browsing service is available.
-  try {
-    Services.pb;
-  } catch (e) {
-    finish_test();
-    return;
-  }
-
-  // Tell the private browsing service to not attempt to restore window state.
-  Services.prefs.setBoolPref("browser.privatebrowsing.keep_current_session",
-    true);
-
   // Test with cookies enabled.
   Services.prefs.setIntPref("network.cookie.cookieBehavior", 0);
 
   // Create URIs pointing to foo.com and bar.com.
   let uri1 = NetUtil.newURI("http://foo.com/foo.html");
   let uri2 = NetUtil.newURI("http://bar.com/bar.html");
 
   // Set a cookie for host 1.
@@ -121,9 +109,8 @@ function do_run_test() {
 
   // Leave private browsing mode and check counts.
   Services.obs.notifyObservers(null, "last-pb-context-exited", null);
   do_check_eq(Services.cookiemgr.countCookiesFromHost(uri1.host), 1);
   do_check_eq(Services.cookiemgr.countCookiesFromHost(uri2.host), 0);
 
   finish_test();
 }
-
--- a/extensions/cookie/test/unit/xpcshell.ini
+++ b/extensions/cookie/test/unit/xpcshell.ini
@@ -5,17 +5,16 @@ tail =
 [test_bug468700.js]
 skip-if = perwindowprivatebrowsing
 [test_bug526789.js]
 [test_bug650522.js]
 [test_bug667087.js]
 [test_cookies_async_failure.js]
 [test_cookies_persistence.js]
 [test_cookies_privatebrowsing.js]
-skip-if = perwindowprivatebrowsing
 [test_cookies_profile_close.js]
 [test_cookies_read.js]
 [test_cookies_sync_failure.js]
 [test_cookies_thirdparty.js]
 [test_cookies_thirdparty_session.js]
 [test_domain_eviction.js]
 [test_eviction.js]
 [test_permmanager_expiration.js]