Bug 1334838 - Avoid matching same host with a non-test URI. r=ckerschb, a=test-only
authorKate McKinley <kmckinley@mozilla.com>
Wed, 08 Feb 2017 11:28:29 +0800
changeset 376129 bf77c1cc662792cc30d113a3eb7d5e880b0ba443
parent 376128 cab6dae5be9dfc0304c2a9325af12cdab373cc31
child 376130 b7af012f09fe2b6d09b73e25d864ef99bcf35612
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersckerschb, test-only
bugs1334838
milestone53.0a2
Bug 1334838 - Avoid matching same host with a non-test URI. r=ckerschb, a=test-only MozReview-Commit-ID: 7Ok7FXFtMoH
dom/security/test/hsts/head.js
--- a/dom/security/test/hsts/head.js
+++ b/dom/security/test/hsts/head.js
@@ -292,17 +292,17 @@ var Observer = {
 
     is("blocked", test_settings[which_test].result[curTest.id], "HSTS priming "+
         which_test+":"+curTest.id+" expected "+
         test_settings[which_test].result[curTest.id]+", got blocked");
     test_settings[which_test].finished[curTest.id] = "blocked";
   },
   get_current_test: function(uri) {
     for (let item in test_servers) {
-      let re = RegExp('https?://'+test_servers[item].host);
+      let re = RegExp('https?://'+test_servers[item].host+'.*\/browser/dom/security/test/hsts/file_testserver.sjs');
       if (re.test(uri)) {
         return test_servers[item];
       }
     }
     return null;
   },
   http_on_modify_request: function (subject, topic, data) {
     let channel = subject.QueryInterface(Ci.nsIHttpChannel);