Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 (function() | 1 (function() |
2 { | 2 { |
3 let server = null; | 3 let server = null; |
4 let frame = null; | 4 let frame = null; |
5 let requestNotifier = null; | 5 let requestNotifier = null; |
6 let httpProtocol = null; | 6 let httpProtocol = null; |
7 | 7 |
8 module("Content policy", { | 8 module("Content policy", { |
9 setup: function() | 9 setup: function() |
10 { | 10 { |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
299 'function()' + | 299 'function()' + |
300 '{' + | 300 '{' + |
301 dispatchReadyEvent + | 301 dispatchReadyEvent + |
302 '},' + | 302 '},' + |
303 'function()' + | 303 'function()' + |
304 '{' + | 304 '{' + |
305 dispatchReadyEvent + | 305 dispatchReadyEvent + |
306 '}' + | 306 '}' + |
307 ');' + | 307 ');' + |
308 '</script>', | 308 '</script>', |
309 "http://127.0.0.1:1234/test.xml", "xmlhttprequest", false, false | 309 "http://127.0.0.1:1234/test.xml", "xmlhttprequest", false, true |
Wladimir Palant
2015/12/31 13:38:45
Last value should be true here, not false (explici
Sebastian Noack
2015/12/31 14:36:39
Done.
| |
310 ]); | 310 ]); |
311 } | 311 } |
312 | 312 |
313 let policyHits = []; | 313 let policyHits = []; |
314 function onPolicyHit(item, scanComplete) | 314 function onPolicyHit(item, scanComplete) |
315 { | 315 { |
316 if (!item) | 316 if (!item) |
317 return; | 317 return; |
318 if (item.location == "http://127.0.0.1:1234/test" || | 318 if (item.location == "http://127.0.0.1:1234/test" || |
319 item.location == "http://127.0.0.1:1234/redirect.gif" || | 319 item.location == "http://127.0.0.1:1234/redirect.gif" || |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
458 3: "running with filter %S and site exception", | 458 3: "running with filter %S and site exception", |
459 4: "running with filter %S and exception not applicable to sites", | 459 4: "running with filter %S and exception not applicable to sites", |
460 5: "running with filter %S and sitekey exception", | 460 5: "running with filter %S and sitekey exception", |
461 6: "running with filter %S and $genericblock exception", | 461 6: "running with filter %S and $genericblock exception", |
462 7: "running with filter %S$domain=127.0.0.1 and $genericblock exception", | 462 7: "running with filter %S$domain=127.0.0.1 and $genericblock exception", |
463 8: "running with filter %S and $genericblock,sitekey exception" | 463 8: "running with filter %S and $genericblock,sitekey exception" |
464 }; | 464 }; |
465 | 465 |
466 for (let test = 0; test < tests.length; test++) | 466 for (let test = 0; test < tests.length; test++) |
467 { | 467 { |
468 let [name, body, expectedURL, expectedType, expectedDomain, expectedThirdPar ty] = tests[test]; | 468 let [name, , expectedURL] = tests[test]; |
Sebastian Noack
2015/12/31 14:36:39
I were already wondering whether the last paramete
| |
469 for (let stage = 1; stage in stageDescriptions; stage++) | 469 for (let stage = 1; stage in stageDescriptions; stage++) |
470 { | 470 { |
471 let stageDescription = stageDescriptions[stage]; | 471 let stageDescription = stageDescriptions[stage]; |
472 if (stageDescription.indexOf("%S") >= 0) | 472 if (stageDescription.indexOf("%S") >= 0) |
473 stageDescription = stageDescription.replace("%S", expectedURL); | 473 stageDescription = stageDescription.replace("%S", expectedURL); |
474 | 474 |
475 asyncTest(name + " (" + stageDescription + ")", runTest.bind(null, tests[t est], stage)); | 475 asyncTest(name + " (" + stageDescription + ")", runTest.bind(null, tests[t est], stage)); |
476 } | 476 } |
477 } | 477 } |
478 })(); | 478 })(); |
LEFT | RIGHT |