From 9ab1f93ecabda19006312e2bd2a7221ae7a429b5 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Thu, 13 Feb 2014 12:54:31 -0500 Subject: [PATCH] Backed out changeset 0a3fa6d853a6 (bug 915824) for effectively re-enabling tests that were disabled on B2G. CLOSED TREE --HG-- rename : content/base/test/csp/file_csp_report.sjs => content/base/test/file_bug548193.sjs rename : content/base/test/csp/file_policyuri_async_fetch.html => content/base/test/file_bug558431.html rename : content/base/test/csp/file_policyuri_async_fetch.html^headers^ => content/base/test/file_bug558431.html^headers^ rename : content/base/test/csp/file_redirect_content.sjs => content/base/test/file_bug650386_content.sjs rename : content/base/test/csp/file_redirect_report.sjs => content/base/test/file_bug650386_report.sjs rename : content/base/test/csp/file_subframe_run_js_if_allowed.html => content/base/test/file_bug702439.html rename : content/base/test/csp/file_multi_policy_injection_bypass.html => content/base/test/file_bug717511.html rename : content/base/test/csp/file_multi_policy_injection_bypass.html^headers^ => content/base/test/file_bug717511.html^headers^ rename : content/base/test/csp/file_multi_policy_injection_bypass_2.html => content/base/test/file_bug717511_2.html rename : content/base/test/csp/file_multi_policy_injection_bypass_2.html^headers^ => content/base/test/file_bug717511_2.html^headers^ rename : content/base/test/csp/test_csp_report.html => content/base/test/test_bug548193.html rename : content/base/test/csp/test_policyuri_async_fetch.html => content/base/test/test_bug558431.html rename : content/base/test/csp/test_301_redirect.html => content/base/test/test_bug650386_redirect_301.html rename : content/base/test/csp/test_302_redirect.html => content/base/test/test_bug650386_redirect_302.html rename : content/base/test/csp/test_303_redirect.html => content/base/test/test_bug650386_redirect_303.html rename : content/base/test/csp/test_307_redirect.html => content/base/test/test_bug650386_redirect_307.html rename : content/base/test/csp/test_subframe_run_js_if_allowed.html => content/base/test/test_bug702439.html rename : content/base/test/csp/file_subframe_run_js_if_allowed.html^headers^ => content/base/test/test_bug702439.html^headers^ rename : content/base/test/csp/test_multi_policy_injection_bypass.html => content/base/test/test_bug717511.html --- .../csp/file_subframe_run_js_if_allowed.html | 13 ------------- content/base/test/csp/mochitest.ini | 19 ------------------- ...file_csp_report.sjs => file_bug548193.sjs} | 1 - ...i_async_fetch.html => file_bug558431.html} | 3 --- ...^headers^ => file_bug558431.html^headers^} | 0 ...content.sjs => file_bug650386_content.sjs} | 7 +++---- ...t_report.sjs => file_bug650386_report.sjs} | 3 +-- content/base/test/file_bug702439.html | 11 +++++++++++ ...ection_bypass.html => file_bug717511.html} | 3 --- ...^headers^ => file_bug717511.html^headers^} | 0 ...on_bypass_2.html => file_bug717511_2.html} | 3 --- ...eaders^ => file_bug717511_2.html^headers^} | 0 content/base/test/mochitest.ini | 19 +++++++++++++++++++ ...st_csp_report.html => test_bug548193.html} | 9 +++------ ...i_async_fetch.html => test_bug558431.html} | 9 +++------ ....html => test_bug650386_redirect_301.html} | 2 +- ....html => test_bug650386_redirect_302.html} | 2 +- ....html => test_bug650386_redirect_303.html} | 2 +- ....html => test_bug650386_redirect_307.html} | 2 +- ...js_if_allowed.html => test_bug702439.html} | 4 ++-- ...^headers^ => test_bug702439.html^headers^} | 0 ...ection_bypass.html => test_bug717511.html} | 4 ++-- 22 files changed, 48 insertions(+), 68 deletions(-) delete mode 100644 content/base/test/csp/file_subframe_run_js_if_allowed.html rename content/base/test/{csp/file_csp_report.sjs => file_bug548193.sjs} (93%) rename content/base/test/{csp/file_policyuri_async_fetch.html => file_bug558431.html} (69%) rename content/base/test/{csp/file_policyuri_async_fetch.html^headers^ => file_bug558431.html^headers^} (100%) rename content/base/test/{csp/file_redirect_content.sjs => file_bug650386_content.sjs} (86%) rename content/base/test/{csp/file_redirect_report.sjs => file_bug650386_report.sjs} (83%) create mode 100644 content/base/test/file_bug702439.html rename content/base/test/{csp/file_multi_policy_injection_bypass.html => file_bug717511.html} (89%) rename content/base/test/{csp/file_multi_policy_injection_bypass.html^headers^ => file_bug717511.html^headers^} (100%) rename content/base/test/{csp/file_multi_policy_injection_bypass_2.html => file_bug717511_2.html} (89%) rename content/base/test/{csp/file_multi_policy_injection_bypass_2.html^headers^ => file_bug717511_2.html^headers^} (100%) rename content/base/test/{csp/test_csp_report.html => test_bug548193.html} (94%) rename content/base/test/{csp/test_policyuri_async_fetch.html => test_bug558431.html} (86%) rename content/base/test/{csp/test_301_redirect.html => test_bug650386_redirect_301.html} (96%) rename content/base/test/{csp/test_302_redirect.html => test_bug650386_redirect_302.html} (96%) rename content/base/test/{csp/test_303_redirect.html => test_bug650386_redirect_303.html} (96%) rename content/base/test/{csp/test_307_redirect.html => test_bug650386_redirect_307.html} (96%) rename content/base/test/{csp/test_subframe_run_js_if_allowed.html => test_bug702439.html} (87%) rename content/base/test/{csp/file_subframe_run_js_if_allowed.html^headers^ => test_bug702439.html^headers^} (100%) rename content/base/test/{csp/test_multi_policy_injection_bypass.html => test_bug717511.html} (95%) diff --git a/content/base/test/csp/file_subframe_run_js_if_allowed.html b/content/base/test/csp/file_subframe_run_js_if_allowed.html deleted file mode 100644 index 3ba970ce846..00000000000 --- a/content/base/test/csp/file_subframe_run_js_if_allowed.html +++ /dev/null @@ -1,13 +0,0 @@ - - - -click - - diff --git a/content/base/test/csp/mochitest.ini b/content/base/test/csp/mochitest.ini index a4c32cd1088..0401d495347 100644 --- a/content/base/test/csp/mochitest.ini +++ b/content/base/test/csp/mochitest.ini @@ -109,17 +109,6 @@ support-files = file_self_none_as_hostname_confusion.html file_self_none_as_hostname_confusion.html^headers^ file_csp_testserver.sjs - file_csp_report.sjs - file_policyuri_async_fetch.html - file_policyuri_async_fetch.html^headers^ - file_redirect_content.sjs - file_redirect_report.sjs - file_subframe_run_js_if_allowed.html - file_subframe_run_js_if_allowed.html^headers^ - file_multi_policy_injection_bypass.html - file_multi_policy_injection_bypass.html^headers^ - file_multi_policy_injection_bypass_2.html - file_multi_policy_injection_bypass_2.html^headers^ file_csp_regexp_parsing.html file_csp_regexp_parsing.js file_report_uri_missing_in_report_only_header.html @@ -149,13 +138,5 @@ support-files = [test_dual_headers_warning.html] [test_self_none_as_hostname_confusion.html] [test_bug949549.html] -[test_csp_report.html] -[test_policyuri_async_fetch.html] -[test_301_redirect.html] -[test_302_redirect.html] -[test_303_redirect.html] -[test_307_redirect.html] -[test_subframe_run_js_if_allowed.html] -[test_multi_policy_injection_bypass.html] [test_csp_regexp_parsing.html] [test_report_uri_missing_in_report_only_header.html] diff --git a/content/base/test/csp/file_csp_report.sjs b/content/base/test/file_bug548193.sjs similarity index 93% rename from content/base/test/csp/file_csp_report.sjs rename to content/base/test/file_bug548193.sjs index baf88b02d4a..a04392e8ad4 100644 --- a/content/base/test/csp/file_csp_report.sjs +++ b/content/base/test/file_bug548193.sjs @@ -1,5 +1,4 @@ // SJS file for CSP violation report test -// https://bugzilla.mozilla.org/show_bug.cgi?id=548193 function handleRequest(request, response) { var query = {}; diff --git a/content/base/test/csp/file_policyuri_async_fetch.html b/content/base/test/file_bug558431.html similarity index 69% rename from content/base/test/csp/file_policyuri_async_fetch.html rename to content/base/test/file_bug558431.html index cf941d15475..915a7e3fd6a 100644 --- a/content/base/test/csp/file_policyuri_async_fetch.html +++ b/content/base/test/file_bug558431.html @@ -1,5 +1,2 @@ - diff --git a/content/base/test/csp/file_policyuri_async_fetch.html^headers^ b/content/base/test/file_bug558431.html^headers^ similarity index 100% rename from content/base/test/csp/file_policyuri_async_fetch.html^headers^ rename to content/base/test/file_bug558431.html^headers^ diff --git a/content/base/test/csp/file_redirect_content.sjs b/content/base/test/file_bug650386_content.sjs similarity index 86% rename from content/base/test/csp/file_redirect_content.sjs rename to content/base/test/file_bug650386_content.sjs index 9a6461d69bb..c4f20dc4ffc 100644 --- a/content/base/test/csp/file_redirect_content.sjs +++ b/content/base/test/file_bug650386_content.sjs @@ -1,7 +1,6 @@ -// https://bugzilla.mozilla.org/show_bug.cgi?id=650386 -// This SJS file serves file_redirect_content.html +// SJS file for tests for bug650386, serves file_bug650386_content.html // with a CSP that will trigger a violation and that will report it -// to file_redirect_report.sjs +// to file_bug650386_report.sjs // // This handles 301, 302, 303 and 307 redirects. The HTTP status code // returned/type of redirect to do comes from the query string @@ -23,7 +22,7 @@ function handleRequest(request, response) { return; } - var csp = "default-src \'self\';report-uri http://mochi.test:8888/tests/content/base/test/csp/file_redirect_report.sjs?" + redirect; + var csp = "default-src \'self\';report-uri http://mochi.test:8888/tests/content/base/test/file_bug650386_report.sjs?" + redirect; response.setHeader("X-Content-Security-Policy", csp, false); diff --git a/content/base/test/csp/file_redirect_report.sjs b/content/base/test/file_bug650386_report.sjs similarity index 83% rename from content/base/test/csp/file_redirect_report.sjs rename to content/base/test/file_bug650386_report.sjs index 9cc7e654863..af777a9ef8b 100644 --- a/content/base/test/csp/file_redirect_report.sjs +++ b/content/base/test/file_bug650386_report.sjs @@ -1,5 +1,4 @@ -// https://bugzilla.mozilla.org/show_bug.cgi?id=650386 -// This SJS file serves as CSP violation report target +// SJS file for tests for bug650386, this serves as CSP violation report target // and issues a redirect, to make sure the browser does not post to the target // of the redirect, per CSP spec. // This handles 301, 302, 303 and 307 redirects. The HTTP status code diff --git a/content/base/test/file_bug702439.html b/content/base/test/file_bug702439.html new file mode 100644 index 00000000000..b679330fbac --- /dev/null +++ b/content/base/test/file_bug702439.html @@ -0,0 +1,11 @@ + + + +click + + diff --git a/content/base/test/csp/file_multi_policy_injection_bypass.html b/content/base/test/file_bug717511.html similarity index 89% rename from content/base/test/csp/file_multi_policy_injection_bypass.html rename to content/base/test/file_bug717511.html index 82eed84570a..739b356bfef 100644 --- a/content/base/test/csp/file_multi_policy_injection_bypass.html +++ b/content/base/test/file_bug717511.html @@ -1,7 +1,4 @@ - diff --git a/content/base/test/csp/file_multi_policy_injection_bypass.html^headers^ b/content/base/test/file_bug717511.html^headers^ similarity index 100% rename from content/base/test/csp/file_multi_policy_injection_bypass.html^headers^ rename to content/base/test/file_bug717511.html^headers^ diff --git a/content/base/test/csp/file_multi_policy_injection_bypass_2.html b/content/base/test/file_bug717511_2.html similarity index 89% rename from content/base/test/csp/file_multi_policy_injection_bypass_2.html rename to content/base/test/file_bug717511_2.html index 6f27a043fb8..03a4a063e46 100644 --- a/content/base/test/csp/file_multi_policy_injection_bypass_2.html +++ b/content/base/test/file_bug717511_2.html @@ -1,7 +1,4 @@ - diff --git a/content/base/test/csp/file_multi_policy_injection_bypass_2.html^headers^ b/content/base/test/file_bug717511_2.html^headers^ similarity index 100% rename from content/base/test/csp/file_multi_policy_injection_bypass_2.html^headers^ rename to content/base/test/file_bug717511_2.html^headers^ diff --git a/content/base/test/mochitest.ini b/content/base/test/mochitest.ini index 27d17f01e13..25ffa92d432 100644 --- a/content/base/test/mochitest.ini +++ b/content/base/test/mochitest.ini @@ -94,7 +94,10 @@ support-files = file_bug503481b_inner.html file_bug541937.html file_bug541937.xhtml + file_bug548193.sjs file_bug557892.html + file_bug558431.html + file_bug558431.html^headers^ file_bug562137.txt file_bug590812-ref.xhtml file_bug590812.xml @@ -109,6 +112,8 @@ support-files = file_bug604660-6.xsl file_bug622088.sjs file_bug622088_inner.html + file_bug650386_content.sjs + file_bug650386_report.sjs file_bug675121.sjs file_bug687859-16.js file_bug687859-16.js^headers^ @@ -119,11 +124,16 @@ support-files = file_bug687859-http.js^headers^ file_bug687859-inherit.js file_bug692434.xml + file_bug702439.html file_bug707142_baseline.json file_bug707142_bom.json file_bug707142_utf-16.json file_bug708620-2.html file_bug708620.html + file_bug717511.html + file_bug717511.html^headers^ + file_bug717511_2.html + file_bug717511_2.html^headers^ file_bug782342.txt file_bug787778.sjs file_bug804395.jar @@ -401,9 +411,11 @@ support-files = [test_bug544642.html] [test_bug545644.html] [test_bug545644.xhtml] +[test_bug548193.html] [test_bug548463.html] [test_bug553896.xhtml] [test_bug557892.html] +[test_bug558431.html] [test_bug558726.html] [test_bug559526.html] [test_bug560780.html] @@ -441,6 +453,10 @@ support-files = [test_bug631615.html] [test_bug638112.html] [test_bug647518.html] +[test_bug650386_redirect_301.html] +[test_bug650386_redirect_302.html] +[test_bug650386_redirect_303.html] +[test_bug650386_redirect_307.html] [test_bug656283.html] [test_bug664916.html] [test_bug666604.html] @@ -462,11 +478,14 @@ support-files = [test_bug696301-2.html] [test_bug698381.html] [test_bug698384.html] +[test_bug702439.html] +[test_bug702439.html^headers^] [test_bug704063.html] [test_bug707142.html] [test_bug708620.html] [test_bug711047.html] [test_bug711180.html] +[test_bug717511.html] [test_bug719533.html] [test_bug726364.html] [test_bug737087.html] diff --git a/content/base/test/csp/test_csp_report.html b/content/base/test/test_bug548193.html similarity index 94% rename from content/base/test/csp/test_csp_report.html rename to content/base/test/test_bug548193.html index 1462bd85e46..94d621d569f 100644 --- a/content/base/test/csp/test_csp_report.html +++ b/content/base/test/test_bug548193.html @@ -1,10 +1,7 @@ - - Test for Bug 548193 + Test for CSP JSON violation report @@ -76,13 +73,13 @@ examiner.prototype = { } // content file that triggers a violation report -var testFile = "file_csp_report.sjs"; +var testFile = "file_bug548193.sjs"; window.checkResults = function(reportObj) { var cspReport = reportObj["csp-report"]; // correct violating request is(cspReport["document-uri"], - "http://mochi.test:8888/tests/content/base/test/csp/" + testFile, + "http://mochi.test:8888/tests/content/base/test/" + testFile, "Incorrect violating request"); // correct blocked-uri is(cspReport["blocked-uri"], diff --git a/content/base/test/csp/test_policyuri_async_fetch.html b/content/base/test/test_bug558431.html similarity index 86% rename from content/base/test/csp/test_policyuri_async_fetch.html rename to content/base/test/test_bug558431.html index c782d1a4997..cb681c877f1 100644 --- a/content/base/test/csp/test_policyuri_async_fetch.html +++ b/content/base/test/test_bug558431.html @@ -1,11 +1,8 @@ - - Test for Bug 558431 - + Test for CSP async policy-uri + @@ -27,7 +24,7 @@ f.addEventListener('load', function() { SimpleTest.finish(); }, false); // load the test frame -f.src = "file_policyuri_async_fetch.html"; +f.src = "file_bug558431.html"; SimpleTest.waitForExplicitFinish(); diff --git a/content/base/test/csp/test_301_redirect.html b/content/base/test/test_bug650386_redirect_301.html similarity index 96% rename from content/base/test/csp/test_301_redirect.html rename to content/base/test/test_bug650386_redirect_301.html index 16fe9175099..d90c2c4c4b9 100644 --- a/content/base/test/csp/test_301_redirect.html +++ b/content/base/test/test_bug650386_redirect_301.html @@ -71,7 +71,7 @@ window.done = function(result) { SimpleTest.waitForExplicitFinish(); // save this for last so that our listeners are registered. -document.getElementById('content_iframe').src = 'file_redirect_content.sjs?301'; +document.getElementById('content_iframe').src = 'file_bug650386_content.sjs?301'; diff --git a/content/base/test/csp/test_302_redirect.html b/content/base/test/test_bug650386_redirect_302.html similarity index 96% rename from content/base/test/csp/test_302_redirect.html rename to content/base/test/test_bug650386_redirect_302.html index bbd618e34f3..b45fddb9b5c 100644 --- a/content/base/test/csp/test_302_redirect.html +++ b/content/base/test/test_bug650386_redirect_302.html @@ -71,7 +71,7 @@ window.done = function(result) { SimpleTest.waitForExplicitFinish(); // save this for last so that our listeners are registered. -document.getElementById('content_iframe').src = 'file_redirect_content.sjs?302'; +document.getElementById('content_iframe').src = 'file_bug650386_content.sjs?302'; diff --git a/content/base/test/csp/test_303_redirect.html b/content/base/test/test_bug650386_redirect_303.html similarity index 96% rename from content/base/test/csp/test_303_redirect.html rename to content/base/test/test_bug650386_redirect_303.html index 40052784c51..ea0075f10c0 100644 --- a/content/base/test/csp/test_303_redirect.html +++ b/content/base/test/test_bug650386_redirect_303.html @@ -71,7 +71,7 @@ window.done = function(result) { SimpleTest.waitForExplicitFinish(); // save this for last so that our listeners are registered. -document.getElementById('content_iframe').src = 'file_redirect_content.sjs?303'; +document.getElementById('content_iframe').src = 'file_bug650386_content.sjs?303'; diff --git a/content/base/test/csp/test_307_redirect.html b/content/base/test/test_bug650386_redirect_307.html similarity index 96% rename from content/base/test/csp/test_307_redirect.html rename to content/base/test/test_bug650386_redirect_307.html index a35b89e7a6b..d16670602a8 100644 --- a/content/base/test/csp/test_307_redirect.html +++ b/content/base/test/test_bug650386_redirect_307.html @@ -71,7 +71,7 @@ window.done = function(result) { SimpleTest.waitForExplicitFinish(); // save this for last so that our listeners are registered. -document.getElementById('content_iframe').src = 'file_redirect_content.sjs?307'; +document.getElementById('content_iframe').src = 'file_bug650386_content.sjs?307'; diff --git a/content/base/test/csp/test_subframe_run_js_if_allowed.html b/content/base/test/test_bug702439.html similarity index 87% rename from content/base/test/csp/test_subframe_run_js_if_allowed.html rename to content/base/test/test_bug702439.html index 96a70b366a9..e1fdecbf8c2 100644 --- a/content/base/test/csp/test_subframe_run_js_if_allowed.html +++ b/content/base/test/test_bug702439.html @@ -8,7 +8,7 @@ permitted to execute javascript: URLs assuming the policy allows this. --> - Test for Bug 702439 + Test for Bug 428847 @@ -27,6 +27,6 @@ function checkResult() SimpleTest.waitForExplicitFinish(); - + diff --git a/content/base/test/csp/file_subframe_run_js_if_allowed.html^headers^ b/content/base/test/test_bug702439.html^headers^ similarity index 100% rename from content/base/test/csp/file_subframe_run_js_if_allowed.html^headers^ rename to content/base/test/test_bug702439.html^headers^ diff --git a/content/base/test/csp/test_multi_policy_injection_bypass.html b/content/base/test/test_bug717511.html similarity index 95% rename from content/base/test/csp/test_multi_policy_injection_bypass.html rename to content/base/test/test_bug717511.html index d97de436590..364394f0295 100644 --- a/content/base/test/csp/test_multi_policy_injection_bypass.html +++ b/content/base/test/test_bug717511.html @@ -115,8 +115,8 @@ SimpleTest.waitForExplicitFinish(); // save this for last so that our listeners are registered. // ... this loads the testbed of good and bad requests. -document.getElementById('cspframe').src = 'file_multi_policy_injection_bypass.html'; -document.getElementById('cspframe2').src = 'file_multi_policy_injection_bypass_2.html'; +document.getElementById('cspframe').src = 'file_bug717511.html'; +document.getElementById('cspframe2').src = 'file_bug717511_2.html';