Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: chrome/content/tests/policy.js

Issue 29333123: Issue 3459 - Make content policy test for fetch() explicitly dispatch abp:frameready (Closed)
Left Patch Set: Created Dec. 30, 2015, 3:40 p.m.
Right Patch Set: Set explicitEvent Created Dec. 31, 2015, 2:34 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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
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 })();
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld