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 a41c84bee024
parent 242979 7f32601dd394
child 242981 d918f7ea93fe
push id4353
push userryanvm@gmail.com
push date2015-01-22 18:19 +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();