gecko/content/base/test/csp/file_CSP_main.js

17 lines
494 B
JavaScript
Raw Normal View History

// some javascript for the CSP XHR tests
//
try {
var xhr_good = new XMLHttpRequest();
Bug 903080 - Move CSP tests in content/base/test into a subdir; r=ddahl+mshal --HG-- rename : content/base/test/file_CSP.css => content/base/test/csp/file_CSP.css rename : content/base/test/file_CSP.sjs => content/base/test/csp/file_CSP.sjs rename : content/base/test/file_CSP_bug663567.xsl => content/base/test/csp/file_CSP_bug663567.xsl rename : content/base/test/file_CSP_bug663567_allows.xml => content/base/test/csp/file_CSP_bug663567_allows.xml rename : content/base/test/file_CSP_bug663567_allows.xml^headers^ => content/base/test/csp/file_CSP_bug663567_allows.xml^headers^ rename : content/base/test/file_CSP_bug663567_blocks.xml => content/base/test/csp/file_CSP_bug663567_blocks.xml rename : content/base/test/file_CSP_bug663567_blocks.xml^headers^ => content/base/test/csp/file_CSP_bug663567_blocks.xml^headers^ rename : content/base/test/file_CSP_bug802872.html => content/base/test/csp/file_CSP_bug802872.html rename : content/base/test/file_CSP_bug802872.html^headers^ => content/base/test/csp/file_CSP_bug802872.html^headers^ rename : content/base/test/file_CSP_bug802872.js => content/base/test/csp/file_CSP_bug802872.js rename : content/base/test/file_CSP_bug802872.sjs => content/base/test/csp/file_CSP_bug802872.sjs rename : content/base/test/file_CSP_bug885433_allows.html => content/base/test/csp/file_CSP_bug885433_allows.html rename : content/base/test/file_CSP_bug885433_allows.html^headers^ => content/base/test/csp/file_CSP_bug885433_allows.html^headers^ rename : content/base/test/file_CSP_bug885433_blocks.html => content/base/test/csp/file_CSP_bug885433_blocks.html rename : content/base/test/file_CSP_bug885433_blocks.html^headers^ => content/base/test/csp/file_CSP_bug885433_blocks.html^headers^ rename : content/base/test/file_CSP_bug888172.html => content/base/test/csp/file_CSP_bug888172.html rename : content/base/test/file_CSP_bug888172.sjs => content/base/test/csp/file_CSP_bug888172.sjs rename : content/base/test/file_CSP_evalscript_main.html => content/base/test/csp/file_CSP_evalscript_main.html rename : content/base/test/file_CSP_evalscript_main.html^headers^ => content/base/test/csp/file_CSP_evalscript_main.html^headers^ rename : content/base/test/file_CSP_evalscript_main.js => content/base/test/csp/file_CSP_evalscript_main.js rename : content/base/test/file_CSP_evalscript_main_allowed.js => content/base/test/csp/file_CSP_evalscript_main_allowed.js rename : content/base/test/file_CSP_evalscript_main_allowed_getCRMFRequest.js => content/base/test/csp/file_CSP_evalscript_main_allowed_getCRMFRequest.js rename : content/base/test/file_CSP_evalscript_main_getCRMFRequest.html => content/base/test/csp/file_CSP_evalscript_main_getCRMFRequest.html rename : content/base/test/file_CSP_evalscript_main_getCRMFRequest.html^headers^ => content/base/test/csp/file_CSP_evalscript_main_getCRMFRequest.html^headers^ rename : content/base/test/file_CSP_evalscript_main_getCRMFRequest.js => content/base/test/csp/file_CSP_evalscript_main_getCRMFRequest.js rename : content/base/test/file_CSP_evalscript_main_spec_compliant.html => content/base/test/csp/file_CSP_evalscript_main_spec_compliant.html rename : content/base/test/file_CSP_evalscript_main_spec_compliant.html^headers^ => content/base/test/csp/file_CSP_evalscript_main_spec_compliant.html^headers^ rename : content/base/test/file_CSP_evalscript_main_spec_compliant_allowed.html => content/base/test/csp/file_CSP_evalscript_main_spec_compliant_allowed.html rename : content/base/test/file_CSP_evalscript_main_spec_compliant_allowed.html^headers^ => content/base/test/csp/file_CSP_evalscript_main_spec_compliant_allowed.html^headers^ rename : content/base/test/file_CSP_evalscript_main_spec_compliant_allowed_getCRMFRequest.html => content/base/test/csp/file_CSP_evalscript_main_spec_compliant_allowed_getCRMFRequest.html rename : content/base/test/file_CSP_evalscript_main_spec_compliant_allowed_getCRMFRequest.html^headers^ => content/base/test/csp/file_CSP_evalscript_main_spec_compliant_allowed_getCRMFRequest.html^headers^ rename : content/base/test/file_CSP_evalscript_main_spec_compliant_getCRMFRequest.html => content/base/test/csp/file_CSP_evalscript_main_spec_compliant_getCRMFRequest.html rename : content/base/test/file_CSP_evalscript_main_spec_compliant_getCRMFRequest.html^headers^ => content/base/test/csp/file_CSP_evalscript_main_spec_compliant_getCRMFRequest.html^headers^ rename : content/base/test/file_CSP_evalscript_no_CSP_at_all.html => content/base/test/csp/file_CSP_evalscript_no_CSP_at_all.html rename : content/base/test/file_CSP_evalscript_no_CSP_at_all.html^headers^ => content/base/test/csp/file_CSP_evalscript_no_CSP_at_all.html^headers^ rename : content/base/test/file_CSP_evalscript_no_CSP_at_all.js => content/base/test/csp/file_CSP_evalscript_no_CSP_at_all.js rename : content/base/test/file_CSP_frameancestors.sjs => content/base/test/csp/file_CSP_frameancestors.sjs rename : content/base/test/file_CSP_frameancestors_main.html => content/base/test/csp/file_CSP_frameancestors_main.html rename : content/base/test/file_CSP_frameancestors_main.js => content/base/test/csp/file_CSP_frameancestors_main.js rename : content/base/test/file_CSP_frameancestors_main_spec_compliant.html => content/base/test/csp/file_CSP_frameancestors_main_spec_compliant.html rename : content/base/test/file_CSP_frameancestors_main_spec_compliant.js => content/base/test/csp/file_CSP_frameancestors_main_spec_compliant.js rename : content/base/test/file_CSP_frameancestors_spec_compliant.sjs => content/base/test/csp/file_CSP_frameancestors_spec_compliant.sjs rename : content/base/test/file_CSP_inlinescript_main.html => content/base/test/csp/file_CSP_inlinescript_main.html rename : content/base/test/file_CSP_inlinescript_main.html^headers^ => content/base/test/csp/file_CSP_inlinescript_main.html^headers^ rename : content/base/test/file_CSP_inlinescript_main_spec_compliant.html => content/base/test/csp/file_CSP_inlinescript_main_spec_compliant.html rename : content/base/test/file_CSP_inlinescript_main_spec_compliant.html^headers^ => content/base/test/csp/file_CSP_inlinescript_main_spec_compliant.html^headers^ rename : content/base/test/file_CSP_inlinescript_main_spec_compliant_allowed.html => content/base/test/csp/file_CSP_inlinescript_main_spec_compliant_allowed.html rename : content/base/test/file_CSP_inlinescript_main_spec_compliant_allowed.html^headers^ => content/base/test/csp/file_CSP_inlinescript_main_spec_compliant_allowed.html^headers^ rename : content/base/test/file_CSP_inlinestyle_main.html => content/base/test/csp/file_CSP_inlinestyle_main.html rename : content/base/test/file_CSP_inlinestyle_main.html^headers^ => content/base/test/csp/file_CSP_inlinestyle_main.html^headers^ rename : content/base/test/file_CSP_inlinestyle_main_spec_compliant.html => content/base/test/csp/file_CSP_inlinestyle_main_spec_compliant.html rename : content/base/test/file_CSP_inlinestyle_main_spec_compliant.html^headers^ => content/base/test/csp/file_CSP_inlinestyle_main_spec_compliant.html^headers^ rename : content/base/test/file_CSP_inlinestyle_main_spec_compliant_allowed.html => content/base/test/csp/file_CSP_inlinestyle_main_spec_compliant_allowed.html rename : content/base/test/file_CSP_inlinestyle_main_spec_compliant_allowed.html^headers^ => content/base/test/csp/file_CSP_inlinestyle_main_spec_compliant_allowed.html^headers^ rename : content/base/test/file_CSP_main.html => content/base/test/csp/file_CSP_main.html rename : content/base/test/file_CSP_main.html^headers^ => content/base/test/csp/file_CSP_main.html^headers^ rename : content/base/test/file_CSP_main.js => content/base/test/csp/file_CSP_main.js rename : content/base/test/file_CSP_main_spec_compliant.html => content/base/test/csp/file_CSP_main_spec_compliant.html rename : content/base/test/file_CSP_main_spec_compliant.html^headers^ => content/base/test/csp/file_CSP_main_spec_compliant.html^headers^ rename : content/base/test/file_CSP_main_spec_compliant.js => content/base/test/csp/file_CSP_main_spec_compliant.js rename : content/base/test/file_bothCSPheaders.html => content/base/test/csp/file_bothCSPheaders.html rename : content/base/test/file_bothCSPheaders.html^headers^ => content/base/test/csp/file_bothCSPheaders.html^headers^ rename : content/base/test/file_csp_bug768029.html => content/base/test/csp/file_csp_bug768029.html rename : content/base/test/file_csp_bug768029.sjs => content/base/test/csp/file_csp_bug768029.sjs rename : content/base/test/file_csp_bug773891.html => content/base/test/csp/file_csp_bug773891.html rename : content/base/test/file_csp_bug773891.sjs => content/base/test/csp/file_csp_bug773891.sjs rename : content/base/test/file_csp_redirects_main.html => content/base/test/csp/file_csp_redirects_main.html rename : content/base/test/file_csp_redirects_page.sjs => content/base/test/csp/file_csp_redirects_page.sjs rename : content/base/test/file_csp_redirects_resource.sjs => content/base/test/csp/file_csp_redirects_resource.sjs rename : content/base/test/test_CSP.html => content/base/test/csp/test_CSP.html rename : content/base/test/test_CSP_bug663567.html => content/base/test/csp/test_CSP_bug663567.html rename : content/base/test/test_CSP_bug802872.html => content/base/test/csp/test_CSP_bug802872.html rename : content/base/test/test_CSP_bug885433.html => content/base/test/csp/test_CSP_bug885433.html rename : content/base/test/test_CSP_bug888172.html => content/base/test/csp/test_CSP_bug888172.html rename : content/base/test/test_CSP_evalscript.html => content/base/test/csp/test_CSP_evalscript.html rename : content/base/test/test_CSP_evalscript_getCRMFRequest.html => content/base/test/csp/test_CSP_evalscript_getCRMFRequest.html rename : content/base/test/test_CSP_frameancestors.html => content/base/test/csp/test_CSP_frameancestors.html rename : content/base/test/test_CSP_inlinescript.html => content/base/test/csp/test_CSP_inlinescript.html rename : content/base/test/test_CSP_inlinestyle.html => content/base/test/csp/test_CSP_inlinestyle.html rename : content/base/test/test_bothCSPheaders.html => content/base/test/csp/test_bothCSPheaders.html rename : content/base/test/chrome/test_csp_bug768029.html => content/base/test/csp/test_csp_bug768029.html rename : content/base/test/chrome/test_csp_bug773891.html => content/base/test/csp/test_csp_bug773891.html rename : content/base/test/test_csp_redirects.html => content/base/test/csp/test_csp_redirects.html
2013-09-05 23:41:38 -07:00
var xhr_good_uri ="http://mochi.test:8888/tests/content/base/test/csp/file_CSP.sjs?testid=xhr_good";
xhr_good.open("GET", xhr_good_uri, true);
xhr_good.send(null);
} catch(e) {}
try {
var xhr_bad = new XMLHttpRequest();
Bug 903080 - Move CSP tests in content/base/test into a subdir; r=ddahl+mshal --HG-- rename : content/base/test/file_CSP.css => content/base/test/csp/file_CSP.css rename : content/base/test/file_CSP.sjs => content/base/test/csp/file_CSP.sjs rename : content/base/test/file_CSP_bug663567.xsl => content/base/test/csp/file_CSP_bug663567.xsl rename : content/base/test/file_CSP_bug663567_allows.xml => content/base/test/csp/file_CSP_bug663567_allows.xml rename : content/base/test/file_CSP_bug663567_allows.xml^headers^ => content/base/test/csp/file_CSP_bug663567_allows.xml^headers^ rename : content/base/test/file_CSP_bug663567_blocks.xml => content/base/test/csp/file_CSP_bug663567_blocks.xml rename : content/base/test/file_CSP_bug663567_blocks.xml^headers^ => content/base/test/csp/file_CSP_bug663567_blocks.xml^headers^ rename : content/base/test/file_CSP_bug802872.html => content/base/test/csp/file_CSP_bug802872.html rename : content/base/test/file_CSP_bug802872.html^headers^ => content/base/test/csp/file_CSP_bug802872.html^headers^ rename : content/base/test/file_CSP_bug802872.js => content/base/test/csp/file_CSP_bug802872.js rename : content/base/test/file_CSP_bug802872.sjs => content/base/test/csp/file_CSP_bug802872.sjs rename : content/base/test/file_CSP_bug885433_allows.html => content/base/test/csp/file_CSP_bug885433_allows.html rename : content/base/test/file_CSP_bug885433_allows.html^headers^ => content/base/test/csp/file_CSP_bug885433_allows.html^headers^ rename : content/base/test/file_CSP_bug885433_blocks.html => content/base/test/csp/file_CSP_bug885433_blocks.html rename : content/base/test/file_CSP_bug885433_blocks.html^headers^ => content/base/test/csp/file_CSP_bug885433_blocks.html^headers^ rename : content/base/test/file_CSP_bug888172.html => content/base/test/csp/file_CSP_bug888172.html rename : content/base/test/file_CSP_bug888172.sjs => content/base/test/csp/file_CSP_bug888172.sjs rename : content/base/test/file_CSP_evalscript_main.html => content/base/test/csp/file_CSP_evalscript_main.html rename : content/base/test/file_CSP_evalscript_main.html^headers^ => content/base/test/csp/file_CSP_evalscript_main.html^headers^ rename : content/base/test/file_CSP_evalscript_main.js => content/base/test/csp/file_CSP_evalscript_main.js rename : content/base/test/file_CSP_evalscript_main_allowed.js => content/base/test/csp/file_CSP_evalscript_main_allowed.js rename : content/base/test/file_CSP_evalscript_main_allowed_getCRMFRequest.js => content/base/test/csp/file_CSP_evalscript_main_allowed_getCRMFRequest.js rename : content/base/test/file_CSP_evalscript_main_getCRMFRequest.html => content/base/test/csp/file_CSP_evalscript_main_getCRMFRequest.html rename : content/base/test/file_CSP_evalscript_main_getCRMFRequest.html^headers^ => content/base/test/csp/file_CSP_evalscript_main_getCRMFRequest.html^headers^ rename : content/base/test/file_CSP_evalscript_main_getCRMFRequest.js => content/base/test/csp/file_CSP_evalscript_main_getCRMFRequest.js rename : content/base/test/file_CSP_evalscript_main_spec_compliant.html => content/base/test/csp/file_CSP_evalscript_main_spec_compliant.html rename : content/base/test/file_CSP_evalscript_main_spec_compliant.html^headers^ => content/base/test/csp/file_CSP_evalscript_main_spec_compliant.html^headers^ rename : content/base/test/file_CSP_evalscript_main_spec_compliant_allowed.html => content/base/test/csp/file_CSP_evalscript_main_spec_compliant_allowed.html rename : content/base/test/file_CSP_evalscript_main_spec_compliant_allowed.html^headers^ => content/base/test/csp/file_CSP_evalscript_main_spec_compliant_allowed.html^headers^ rename : content/base/test/file_CSP_evalscript_main_spec_compliant_allowed_getCRMFRequest.html => content/base/test/csp/file_CSP_evalscript_main_spec_compliant_allowed_getCRMFRequest.html rename : content/base/test/file_CSP_evalscript_main_spec_compliant_allowed_getCRMFRequest.html^headers^ => content/base/test/csp/file_CSP_evalscript_main_spec_compliant_allowed_getCRMFRequest.html^headers^ rename : content/base/test/file_CSP_evalscript_main_spec_compliant_getCRMFRequest.html => content/base/test/csp/file_CSP_evalscript_main_spec_compliant_getCRMFRequest.html rename : content/base/test/file_CSP_evalscript_main_spec_compliant_getCRMFRequest.html^headers^ => content/base/test/csp/file_CSP_evalscript_main_spec_compliant_getCRMFRequest.html^headers^ rename : content/base/test/file_CSP_evalscript_no_CSP_at_all.html => content/base/test/csp/file_CSP_evalscript_no_CSP_at_all.html rename : content/base/test/file_CSP_evalscript_no_CSP_at_all.html^headers^ => content/base/test/csp/file_CSP_evalscript_no_CSP_at_all.html^headers^ rename : content/base/test/file_CSP_evalscript_no_CSP_at_all.js => content/base/test/csp/file_CSP_evalscript_no_CSP_at_all.js rename : content/base/test/file_CSP_frameancestors.sjs => content/base/test/csp/file_CSP_frameancestors.sjs rename : content/base/test/file_CSP_frameancestors_main.html => content/base/test/csp/file_CSP_frameancestors_main.html rename : content/base/test/file_CSP_frameancestors_main.js => content/base/test/csp/file_CSP_frameancestors_main.js rename : content/base/test/file_CSP_frameancestors_main_spec_compliant.html => content/base/test/csp/file_CSP_frameancestors_main_spec_compliant.html rename : content/base/test/file_CSP_frameancestors_main_spec_compliant.js => content/base/test/csp/file_CSP_frameancestors_main_spec_compliant.js rename : content/base/test/file_CSP_frameancestors_spec_compliant.sjs => content/base/test/csp/file_CSP_frameancestors_spec_compliant.sjs rename : content/base/test/file_CSP_inlinescript_main.html => content/base/test/csp/file_CSP_inlinescript_main.html rename : content/base/test/file_CSP_inlinescript_main.html^headers^ => content/base/test/csp/file_CSP_inlinescript_main.html^headers^ rename : content/base/test/file_CSP_inlinescript_main_spec_compliant.html => content/base/test/csp/file_CSP_inlinescript_main_spec_compliant.html rename : content/base/test/file_CSP_inlinescript_main_spec_compliant.html^headers^ => content/base/test/csp/file_CSP_inlinescript_main_spec_compliant.html^headers^ rename : content/base/test/file_CSP_inlinescript_main_spec_compliant_allowed.html => content/base/test/csp/file_CSP_inlinescript_main_spec_compliant_allowed.html rename : content/base/test/file_CSP_inlinescript_main_spec_compliant_allowed.html^headers^ => content/base/test/csp/file_CSP_inlinescript_main_spec_compliant_allowed.html^headers^ rename : content/base/test/file_CSP_inlinestyle_main.html => content/base/test/csp/file_CSP_inlinestyle_main.html rename : content/base/test/file_CSP_inlinestyle_main.html^headers^ => content/base/test/csp/file_CSP_inlinestyle_main.html^headers^ rename : content/base/test/file_CSP_inlinestyle_main_spec_compliant.html => content/base/test/csp/file_CSP_inlinestyle_main_spec_compliant.html rename : content/base/test/file_CSP_inlinestyle_main_spec_compliant.html^headers^ => content/base/test/csp/file_CSP_inlinestyle_main_spec_compliant.html^headers^ rename : content/base/test/file_CSP_inlinestyle_main_spec_compliant_allowed.html => content/base/test/csp/file_CSP_inlinestyle_main_spec_compliant_allowed.html rename : content/base/test/file_CSP_inlinestyle_main_spec_compliant_allowed.html^headers^ => content/base/test/csp/file_CSP_inlinestyle_main_spec_compliant_allowed.html^headers^ rename : content/base/test/file_CSP_main.html => content/base/test/csp/file_CSP_main.html rename : content/base/test/file_CSP_main.html^headers^ => content/base/test/csp/file_CSP_main.html^headers^ rename : content/base/test/file_CSP_main.js => content/base/test/csp/file_CSP_main.js rename : content/base/test/file_CSP_main_spec_compliant.html => content/base/test/csp/file_CSP_main_spec_compliant.html rename : content/base/test/file_CSP_main_spec_compliant.html^headers^ => content/base/test/csp/file_CSP_main_spec_compliant.html^headers^ rename : content/base/test/file_CSP_main_spec_compliant.js => content/base/test/csp/file_CSP_main_spec_compliant.js rename : content/base/test/file_bothCSPheaders.html => content/base/test/csp/file_bothCSPheaders.html rename : content/base/test/file_bothCSPheaders.html^headers^ => content/base/test/csp/file_bothCSPheaders.html^headers^ rename : content/base/test/file_csp_bug768029.html => content/base/test/csp/file_csp_bug768029.html rename : content/base/test/file_csp_bug768029.sjs => content/base/test/csp/file_csp_bug768029.sjs rename : content/base/test/file_csp_bug773891.html => content/base/test/csp/file_csp_bug773891.html rename : content/base/test/file_csp_bug773891.sjs => content/base/test/csp/file_csp_bug773891.sjs rename : content/base/test/file_csp_redirects_main.html => content/base/test/csp/file_csp_redirects_main.html rename : content/base/test/file_csp_redirects_page.sjs => content/base/test/csp/file_csp_redirects_page.sjs rename : content/base/test/file_csp_redirects_resource.sjs => content/base/test/csp/file_csp_redirects_resource.sjs rename : content/base/test/test_CSP.html => content/base/test/csp/test_CSP.html rename : content/base/test/test_CSP_bug663567.html => content/base/test/csp/test_CSP_bug663567.html rename : content/base/test/test_CSP_bug802872.html => content/base/test/csp/test_CSP_bug802872.html rename : content/base/test/test_CSP_bug885433.html => content/base/test/csp/test_CSP_bug885433.html rename : content/base/test/test_CSP_bug888172.html => content/base/test/csp/test_CSP_bug888172.html rename : content/base/test/test_CSP_evalscript.html => content/base/test/csp/test_CSP_evalscript.html rename : content/base/test/test_CSP_evalscript_getCRMFRequest.html => content/base/test/csp/test_CSP_evalscript_getCRMFRequest.html rename : content/base/test/test_CSP_frameancestors.html => content/base/test/csp/test_CSP_frameancestors.html rename : content/base/test/test_CSP_inlinescript.html => content/base/test/csp/test_CSP_inlinescript.html rename : content/base/test/test_CSP_inlinestyle.html => content/base/test/csp/test_CSP_inlinestyle.html rename : content/base/test/test_bothCSPheaders.html => content/base/test/csp/test_bothCSPheaders.html rename : content/base/test/chrome/test_csp_bug768029.html => content/base/test/csp/test_csp_bug768029.html rename : content/base/test/chrome/test_csp_bug773891.html => content/base/test/csp/test_csp_bug773891.html rename : content/base/test/test_csp_redirects.html => content/base/test/csp/test_csp_redirects.html
2013-09-05 23:41:38 -07:00
var xhr_bad_uri ="http://example.com/tests/content/base/test/csp/file_CSP.sjs?testid=xhr_bad";
xhr_bad.open("GET", xhr_bad_uri, true);
xhr_bad.send(null);
} catch(e) {}