Bug 1122445 - CSP: don't normalize path for CSP checks - test updates. r=sstamm, a=sledru
authorChristoph Kerschbaumer <mozilla@christophkerschbaumer.com>
Wed, 21 Jan 2015 16:09:20 -0800
changeset 242980 a41c84bee024dc8c1bb8d33a0f96485414f4ed87
parent 242979 7f32601dd3946f96dca44f7a52353d0467521db2
child 242981 d918f7ea93fee0c0400b671acecf2eca5dc2b5b4
push id4353
push userryanvm@gmail.com
push dateThu, 22 Jan 2015 18:19:05 +0000
treeherdermozilla-beta@a41c84bee024 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssstamm, sledru
bugs1122445
milestone36.0
Bug 1122445 - CSP: don't normalize path for CSP checks - test updates. r=sstamm, a=sledru
dom/base/test/csp/test_csp_path_matching.html
--- a/dom/base/test/csp/test_csp_path_matching.html
+++ b/dom/base/test/csp/test_csp_path_matching.html
@@ -57,16 +57,22 @@ var policies = [
 
   ["blocked", "test1.example.com/tests"],
   ["blocked", "test1.example.com/tests/dom/base/test/csp"],
   ["blocked", "test1.example.com/tests/dom/base/test/csp/file_csp_path_matching.py"],
 
   ["blocked", "test1.example.com:8888/tests"],
   ["blocked", "test1.example.com:8888/tests/dom/base/test/csp"],
   ["blocked", "test1.example.com:8888/tests/dom/base/test/csp/file_csp_path_matching.py"],
+
+  // case insensitive matching for scheme and host, but case sensitive matching for paths
+  ["allowed", "HTTP://test1.EXAMPLE.com/tests/"],
+  ["allowed", "test1.EXAMPLE.com/tests/"],
+  ["blocked", "test1.example.com/tests/dom/base/test/CSP/?foo=val"],
+  ["blocked", "test1.example.com/tests/dom/base/test/csp/FILE_csp_path_matching.js?foo=val"],
 ]
 
 var counter = 0;
 var policy;
 
 function loadNextTest() {
   if (counter == policies.length) {
     SimpleTest.finish();