bug 846862 - re-enable HSTS preload list tests r=mayhemer
authorDavid Keeler <dkeeler@mozilla.com>
Wed, 01 May 2013 09:57:07 -0700
changeset 141438 c19ddcb42f6e2150347d5a1228d23a64fb09a19e
parent 141437 83be5398e9074a9ba446ab882f22b38237cf8b07
child 141439 fab7a1635246e1a18d113c8d48208ba72d1b2b9d
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs846862
milestone23.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 846862 - re-enable HSTS preload list tests r=mayhemer
security/manager/ssl/tests/unit/test_sts_preloadlist_perwindowpb.js
security/manager/ssl/tests/unit/xpcshell.ini
--- a/security/manager/ssl/tests/unit/test_sts_preloadlist_perwindowpb.js
+++ b/security/manager/ssl/tests/unit/test_sts_preloadlist_perwindowpb.js
@@ -15,17 +15,17 @@ Observer.prototype = {
 };
 
 var gObserver = new Observer();
 
 // This is a list of every host we call processStsHeader with
 // (we have to remove any state added to the sts service so as to not muck
 // with other tests).
 var hosts = ["http://keyerror.com", "http://subdomain.intercom.io",
-             "http://subdomain.pixi.me", "http://crypto.cat",
+             "http://subdomain.pixi.me", "http://bugzilla.mozilla.org",
              "http://logentries.com"];
 
 function cleanup() {
   Services.obs.removeObserver(gObserver, "last-pb-context-exited");
 
   for (var host of hosts) {
     var uri = Services.io.newURI(host, null, null);
     gSTSService.removeStsState(uri, 0);
@@ -129,35 +129,35 @@ function test_part1() {
 
   // Simulate leaving private browsing mode
   Services.obs.notifyObservers(null, "last-pb-context-exited", null);
 }
 
 const IS_PRIVATE = Ci.nsISocketProvider.NO_PERMANENT_STORAGE;
 
 function test_private_browsing1() {
-  // sanity - crypto.cat is preloaded, includeSubdomains set
-  do_check_true(gSTSService.isStsHost("crypto.cat", IS_PRIVATE));
-  do_check_true(gSTSService.isStsHost("a.b.c.subdomain.crypto.cat", IS_PRIVATE));
+  // sanity - bugzilla.mozilla.org is preloaded, includeSubdomains set
+  do_check_true(gSTSService.isStsHost("bugzilla.mozilla.org", IS_PRIVATE));
+  do_check_true(gSTSService.isStsHost("a.b.c.subdomain.bugzilla.mozilla.org", IS_PRIVATE));
 
-  var uri = Services.io.newURI("http://crypto.cat", null, null);
+  var uri = Services.io.newURI("http://bugzilla.mozilla.org", null, null);
   gSTSService.processStsHeader(uri, "max-age=0", IS_PRIVATE);
-  do_check_false(gSTSService.isStsHost("crypto.cat", IS_PRIVATE));
-  do_check_false(gSTSService.isStsHost("a.b.subdomain.crypto.cat", IS_PRIVATE));
+  do_check_false(gSTSService.isStsHost("bugzilla.mozilla.org", IS_PRIVATE));
+  do_check_false(gSTSService.isStsHost("a.b.subdomain.bugzilla.mozilla.org", IS_PRIVATE));
 
   // check adding it back in
   gSTSService.processStsHeader(uri, "max-age=1000", IS_PRIVATE);
-  do_check_true(gSTSService.isStsHost("crypto.cat", IS_PRIVATE));
+  do_check_true(gSTSService.isStsHost("bugzilla.mozilla.org", IS_PRIVATE));
   // but no includeSubdomains this time
-  do_check_false(gSTSService.isStsHost("b.subdomain.crypto.cat", IS_PRIVATE));
+  do_check_false(gSTSService.isStsHost("b.subdomain.bugzilla.mozilla.org", IS_PRIVATE));
 
   // do the hokey-pokey...
   gSTSService.processStsHeader(uri, "max-age=0", IS_PRIVATE);
-  do_check_false(gSTSService.isStsHost("crypto.cat", IS_PRIVATE));
-  do_check_false(gSTSService.isStsHost("subdomain.crypto.cat", IS_PRIVATE));
+  do_check_false(gSTSService.isStsHost("bugzilla.mozilla.org", IS_PRIVATE));
+  do_check_false(gSTSService.isStsHost("subdomain.bugzilla.mozilla.org", IS_PRIVATE));
 
   // TODO unfortunately we don't have a good way to know when an entry
   // has expired in the permission manager, so we can't yet extend this test
   // to that case.
   // Test that an expired private browsing entry results in correctly
   // identifying a host that is on the preload list as no longer sts.
   // (This happens when we're in private browsing mode, we get a header from
   // a site on the preload list, and that header later expires. We need to
@@ -171,18 +171,18 @@ function test_private_browsing1() {
   do_check_false(gSTSService.isStsHost("logentries.com", IS_PRIVATE));
 
   // Simulate leaving private browsing mode
   Services.obs.notifyObservers(null, "last-pb-context-exited", null);
 }
 
 function test_private_browsing2() {
   // if this test gets this far, it means there's a private browsing service
-  do_check_true(gSTSService.isStsHost("crypto.cat", 0));
-  // the crypto.cat entry has includeSubdomains set
-  do_check_true(gSTSService.isStsHost("subdomain.crypto.cat", 0));
+  do_check_true(gSTSService.isStsHost("bugzilla.mozilla.org", 0));
+  // the bugzilla.mozilla.org entry has includeSubdomains set
+  do_check_true(gSTSService.isStsHost("subdomain.bugzilla.mozilla.org", 0));
 
   // Now that we're out of private browsing mode, we need to make sure
   // we've "forgotten" that we "forgot" this site's sts status.
   do_check_true(gSTSService.isStsHost("logentries.com", 0));
 
   run_next_test();
 }
--- a/security/manager/ssl/tests/unit/xpcshell.ini
+++ b/security/manager/ssl/tests/unit/xpcshell.ini
@@ -9,14 +9,10 @@ tail =
 # Bug 676972: test hangs consistently on Android
 skip-if = os == "android"
 [test_hash_algorithms.js]
 # Bug 676972: test hangs consistently on Android
 skip-if = os == "android"
 [test_hmac.js]
 # Bug 676972: test hangs consistently on Android
 skip-if = os == "android"
-# Bug 846862: disable test until bug 836097 is resolved
 [test_sts_preloadlist_perwindowpb.js]
-skip-if = true
-# Bug 846862: disable test until bug 836097 is resolved
 [test_sts_preloadlist_selfdestruct.js]
-skip-if = true