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
This commit is contained in:
Ms2ger 2013-09-06 08:41:38 +02:00
parent 9e242a759d
commit 28665d82a2
91 changed files with 180 additions and 151 deletions

View File

@ -326,61 +326,6 @@ MOCHITEST_FILES_B = \
test_bug503481b.html \
file_bug503481b_inner.html \
test_viewport_scroll.html \
test_CSP.html \
file_CSP.sjs \
file_CSP.css \
file_CSP_main.html \
file_CSP_main.html^headers^ \
file_CSP_main_spec_compliant.html \
file_CSP_main_spec_compliant.html^headers^ \
file_CSP_main.js \
file_CSP_main_spec_compliant.js \
test_CSP_frameancestors.html \
file_CSP_frameancestors.sjs \
file_CSP_frameancestors_main.html \
file_CSP_frameancestors_main.js \
file_CSP_frameancestors_spec_compliant.sjs \
file_CSP_frameancestors_main_spec_compliant.html \
file_CSP_frameancestors_main_spec_compliant.js \
test_CSP_inlinescript.html \
file_CSP_inlinescript_main.html \
file_CSP_inlinescript_main.html^headers^ \
file_CSP_inlinescript_main_spec_compliant.html \
file_CSP_inlinescript_main_spec_compliant.html^headers^ \
file_CSP_inlinescript_main_spec_compliant_allowed.html \
file_CSP_inlinescript_main_spec_compliant_allowed.html^headers^ \
test_CSP_evalscript.html \
file_CSP_evalscript_main.html \
file_CSP_evalscript_main.html^headers^ \
file_CSP_evalscript_main.js \
file_CSP_evalscript_main_allowed.js \
file_CSP_evalscript_main_spec_compliant.html \
file_CSP_evalscript_main_spec_compliant.html^headers^ \
file_CSP_evalscript_main_spec_compliant_allowed.html \
file_CSP_evalscript_main_spec_compliant_allowed.html^headers^ \
test_CSP_evalscript_getCRMFRequest.html \
file_CSP_evalscript_main_getCRMFRequest.html \
file_CSP_evalscript_main_getCRMFRequest.html^headers^ \
file_CSP_evalscript_main_getCRMFRequest.js \
file_CSP_evalscript_main_allowed_getCRMFRequest.js \
file_CSP_evalscript_main_spec_compliant_getCRMFRequest.html \
file_CSP_evalscript_main_spec_compliant_getCRMFRequest.html^headers^ \
file_CSP_evalscript_main_spec_compliant_allowed_getCRMFRequest.html \
file_CSP_evalscript_main_spec_compliant_allowed_getCRMFRequest.html^headers^ \
file_CSP_evalscript_no_CSP_at_all.html \
file_CSP_evalscript_no_CSP_at_all.html^headers^ \
file_CSP_evalscript_no_CSP_at_all.js \
test_CSP_inlinestyle.html \
file_CSP_inlinestyle_main.html \
file_CSP_inlinestyle_main.html^headers^ \
file_CSP_inlinestyle_main_spec_compliant.html \
file_CSP_inlinestyle_main_spec_compliant.html^headers^ \
file_CSP_inlinestyle_main_spec_compliant_allowed.html \
file_CSP_inlinestyle_main_spec_compliant_allowed.html^headers^ \
file_csp_bug768029.html \
file_csp_bug768029.sjs \
file_csp_bug773891.html \
file_csp_bug773891.sjs \
test_bug540854.html \
bug540854.sjs \
test_bug548463.html \
@ -395,10 +340,6 @@ MOCHITEST_FILES_B = \
test_bug557892.html \
file_bug557892.html \
test_bug559526.html \
test_csp_redirects.html \
file_csp_redirects_page.sjs \
file_csp_redirects_main.html \
file_csp_redirects_resource.sjs \
test_bug346485.html \
test_bug560780.html \
test_bug562652.html \
@ -625,9 +566,6 @@ MOCHITEST_FILES_C= \
test_bug813919.html \
test_bug814576.html \
test_xhr_withCredentials.html \
test_bothCSPheaders.html \
file_bothCSPheaders.html \
file_bothCSPheaders.html^headers^ \
badMessageEvent2.eventsource \
badMessageEvent2.eventsource^headers^ \
test_object.html \
@ -636,29 +574,10 @@ MOCHITEST_FILES_C= \
test_bug869000.html \
test_bug869002.html \
test_bug876282.html \
test_CSP_bug885433.html \
file_CSP_bug885433_allows.html \
file_CSP_bug885433_allows.html^headers^ \
file_CSP_bug885433_blocks.html \
file_CSP_bug885433_blocks.html^headers^ \
test_bug890580.html \
test_declare_stylesheet_obsolete.html \
variable_style_sheet.sjs \
test_processing_instruction_update_stylesheet.xhtml \
test_CSP_bug888172.html \
file_CSP_bug888172.html \
file_CSP_bug888172.sjs \
test_CSP_bug663567.html \
file_CSP_bug663567_allows.xml \
file_CSP_bug663567_allows.xml^headers^ \
file_CSP_bug663567.xsl \
file_CSP_bug663567_blocks.xml \
file_CSP_bug663567_blocks.xml^headers^ \
test_CSP_bug802872.html \
file_CSP_bug802872.html \
file_CSP_bug802872.html^headers^ \
file_CSP_bug802872.js \
file_CSP_bug802872.sjs \
test_bug907892.html \
file_bug907892.html \
$(NULL)

View File

@ -43,9 +43,7 @@ MOCHITEST_CHROME_FILES = \
test_bug682305.html \
test_bug780199.xul \
test_bug780529.xul \
test_csp_bug768029.html \
test_bug800386.xul \
test_csp_bug773891.html \
test_bug816340.xul \
file_bug816340.xul \
test_domparsing.xul \

View File

@ -0,0 +1,102 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH := @DEPTH@
topsrcdir := @top_srcdir@
srcdir := @srcdir@
VPATH := @srcdir@
relativesrcdir := @relativesrcdir@
include $(DEPTH)/config/autoconf.mk
MOCHITEST_FILES := \
test_CSP.html \
file_CSP.sjs \
file_CSP.css \
file_CSP_main.html \
file_CSP_main.html^headers^ \
file_CSP_main_spec_compliant.html \
file_CSP_main_spec_compliant.html^headers^ \
file_CSP_main.js \
file_CSP_main_spec_compliant.js \
test_CSP_frameancestors.html \
file_CSP_frameancestors.sjs \
file_CSP_frameancestors_main.html \
file_CSP_frameancestors_main.js \
file_CSP_frameancestors_spec_compliant.sjs \
file_CSP_frameancestors_main_spec_compliant.html \
file_CSP_frameancestors_main_spec_compliant.js \
test_CSP_inlinescript.html \
file_CSP_inlinescript_main.html \
file_CSP_inlinescript_main.html^headers^ \
file_CSP_inlinescript_main_spec_compliant.html \
file_CSP_inlinescript_main_spec_compliant.html^headers^ \
file_CSP_inlinescript_main_spec_compliant_allowed.html \
file_CSP_inlinescript_main_spec_compliant_allowed.html^headers^ \
test_CSP_evalscript.html \
file_CSP_evalscript_main.html \
file_CSP_evalscript_main.html^headers^ \
file_CSP_evalscript_main.js \
file_CSP_evalscript_main_allowed.js \
file_CSP_evalscript_main_spec_compliant.html \
file_CSP_evalscript_main_spec_compliant.html^headers^ \
file_CSP_evalscript_main_spec_compliant_allowed.html \
file_CSP_evalscript_main_spec_compliant_allowed.html^headers^ \
test_CSP_evalscript_getCRMFRequest.html \
file_CSP_evalscript_main_getCRMFRequest.html \
file_CSP_evalscript_main_getCRMFRequest.html^headers^ \
file_CSP_evalscript_main_getCRMFRequest.js \
file_CSP_evalscript_main_allowed_getCRMFRequest.js \
file_CSP_evalscript_main_spec_compliant_getCRMFRequest.html \
file_CSP_evalscript_main_spec_compliant_getCRMFRequest.html^headers^ \
file_CSP_evalscript_main_spec_compliant_allowed_getCRMFRequest.html \
file_CSP_evalscript_main_spec_compliant_allowed_getCRMFRequest.html^headers^ \
file_CSP_evalscript_no_CSP_at_all.html \
file_CSP_evalscript_no_CSP_at_all.html^headers^ \
file_CSP_evalscript_no_CSP_at_all.js \
test_CSP_inlinestyle.html \
file_CSP_inlinestyle_main.html \
file_CSP_inlinestyle_main.html^headers^ \
file_CSP_inlinestyle_main_spec_compliant.html \
file_CSP_inlinestyle_main_spec_compliant.html^headers^ \
file_CSP_inlinestyle_main_spec_compliant_allowed.html \
file_CSP_inlinestyle_main_spec_compliant_allowed.html^headers^ \
file_csp_bug768029.html \
file_csp_bug768029.sjs \
file_csp_bug773891.html \
file_csp_bug773891.sjs \
test_csp_redirects.html \
file_csp_redirects_page.sjs \
file_csp_redirects_main.html \
file_csp_redirects_resource.sjs \
test_bothCSPheaders.html \
file_bothCSPheaders.html \
file_bothCSPheaders.html^headers^ \
test_CSP_bug663567.html \
file_CSP_bug663567_allows.xml \
file_CSP_bug663567_allows.xml^headers^ \
file_CSP_bug663567.xsl \
file_CSP_bug663567_blocks.xml \
file_CSP_bug663567_blocks.xml^headers^ \
test_CSP_bug802872.html \
file_CSP_bug802872.html \
file_CSP_bug802872.html^headers^ \
file_CSP_bug802872.js \
file_CSP_bug802872.sjs \
test_CSP_bug885433.html \
file_CSP_bug885433_allows.html \
file_CSP_bug885433_allows.html^headers^ \
file_CSP_bug885433_blocks.html \
file_CSP_bug885433_blocks.html^headers^ \
test_CSP_bug888172.html \
file_CSP_bug888172.html \
file_CSP_bug888172.sjs \
$(NULL)
MOCHITEST_CHROME_FILES := \
test_csp_bug768029.html \
test_csp_bug773891.html \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -12,7 +12,7 @@
}
@font-face {
font-family: "arbitrary_bad";
src: url('http://example.org/tests/content/base/test/file_CSP.sjs?testid=font_bad&type=application/octet-stream');
src: url('http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=font_bad&type=application/octet-stream');
}
.div_arbitrary_good { font-family: "arbitrary_good"; }

View File

@ -8,7 +8,7 @@ function createAllowedEvent() {
* Creates a new EventSource using 'http://mochi.test:8888'. Since all mochitests run on
* 'http://mochi.test', a default-src of 'self' allows this request.
*/
var src_event = new EventSource("http://mochi.test:8888/tests/content/base/test/file_CSP_bug802872.sjs");
var src_event = new EventSource("http://mochi.test:8888/tests/content/base/test/csp/file_CSP_bug802872.sjs");
src_event.onmessage = function(e) {
src_event.close();
@ -26,7 +26,7 @@ function createBlockedEvent() {
* creates a new EventSource using 'http://example.com'. This domain is not whitelisted by the
* CSP of this page, therefore the CSP blocks this request.
*/
var src_event = new EventSource("http://example.com/tests/content/base/test/file_CSP_bug802872.sjs");
var src_event = new EventSource("http://example.com/tests/content/base/test/csp/file_CSP_bug802872.sjs");
src_event.onmessage = function(e) {
src_event.close();

View File

@ -39,5 +39,5 @@ function handleRequest(request, response)
// Send HTML to test allowed/blocked behaviors
response.setHeader("Content-Type", "text/html", false);
response.write(loadHTMLFromFile("tests/content/base/test/file_CSP_bug888172.html"));
response.write(loadHTMLFromFile("tests/content/base/test/csp/file_CSP_bug888172.html"));
}

View File

@ -4,9 +4,9 @@ function setupFrames() {
var $ = function(v) { return document.getElementById(v); }
var base = {
self: '/tests/content/base/test/file_CSP_frameancestors.sjs',
a: 'http://mochi.test:8888/tests/content/base/test/file_CSP_frameancestors.sjs',
b: 'http://example.com/tests/content/base/test/file_CSP_frameancestors.sjs'
self: '/tests/content/base/test/csp/file_CSP_frameancestors.sjs',
a: 'http://mochi.test:8888/tests/content/base/test/csp/file_CSP_frameancestors.sjs',
b: 'http://example.com/tests/content/base/test/csp/file_CSP_frameancestors.sjs'
};
var host = { a: 'http://mochi.test:8888', b: 'http://example.com:80' };

View File

@ -4,9 +4,9 @@ function setupFrames() {
var $ = function(v) { return document.getElementById(v); }
var base = {
self: '/tests/content/base/test/file_CSP_frameancestors_spec_compliant.sjs',
a: 'http://mochi.test:8888/tests/content/base/test/file_CSP_frameancestors_spec_compliant.sjs',
b: 'http://example.com/tests/content/base/test/file_CSP_frameancestors_spec_compliant.sjs'
self: '/tests/content/base/test/csp/file_CSP_frameancestors_spec_compliant.sjs',
a: 'http://mochi.test:8888/tests/content/base/test/csp/file_CSP_frameancestors_spec_compliant.sjs',
b: 'http://example.com/tests/content/base/test/csp/file_CSP_frameancestors_spec_compliant.sjs'
};
var host = { a: 'http://mochi.test:8888', b: 'http://example.com:80' };

View File

@ -1,7 +1,7 @@
<html>
<head>
<link rel='stylesheet' type='text/css'
href='http://example.org/tests/content/base/test/file_CSP.sjs?testid=style_bad&type=text/css' />
href='http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=style_bad&type=text/css' />
<link rel='stylesheet' type='text/css'
href='file_CSP.sjs?testid=style_good&type=text/css' />
@ -13,13 +13,13 @@
</head>
<body>
<!-- these should be stopped by CSP. :) -->
<img src="http://example.org/tests/content/base/test/file_CSP.sjs?testid=img_bad&type=img/png"> </img>
<audio src="http://example.org/tests/content/base/test/file_CSP.sjs?testid=media_bad&type=audio/vorbis"></audio>
<script src='http://example.org/tests/content/base/test/file_CSP.sjs?testid=script_bad&type=text/javascript'></script>
<iframe src='http://example.org/tests/content/base/test/file_CSP.sjs?testid=frame_bad&content=FAIL'></iframe>
<img src="http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=img_bad&type=img/png"> </img>
<audio src="http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=media_bad&type=audio/vorbis"></audio>
<script src='http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=script_bad&type=text/javascript'></script>
<iframe src='http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=frame_bad&content=FAIL'></iframe>
<object width="10" height="10">
<param name="movie" value="http://example.org/tests/content/base/test/file_CSP.sjs?testid=object_bad&type=application/x-shockwave-flash">
<embed src="http://example.org/tests/content/base/test/file_CSP.sjs?testid=object_bad&type=application/x-shockwave-flash"></embed>
<param name="movie" value="http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=object_bad&type=application/x-shockwave-flash">
<embed src="http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=object_bad&type=application/x-shockwave-flash"></embed>
</object>
<!-- these should load ok. :) -->

View File

@ -3,14 +3,14 @@
try {
var xhr_good = new XMLHttpRequest();
var xhr_good_uri ="http://mochi.test:8888/tests/content/base/test/file_CSP.sjs?testid=xhr_good";
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();
var xhr_bad_uri ="http://example.com/tests/content/base/test/file_CSP.sjs?testid=xhr_bad";
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) {}

View File

@ -1,7 +1,7 @@
<html>
<head>
<link rel='stylesheet' type='text/css'
href='http://example.org/tests/content/base/test/file_CSP.sjs?testid=style_spec_compliant_bad&type=text/css' />
href='http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=style_spec_compliant_bad&type=text/css' />
<link rel='stylesheet' type='text/css'
href='file_CSP.sjs?testid=style_spec_compliant_good&type=text/css' />
@ -14,7 +14,7 @@
}
@font-face {
font-family: "arbitrary_bad";
src: url('http://example.org/tests/content/base/test/file_CSP.sjs?testid=font_spec_compliant_bad&type=application/octet-stream');
src: url('http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=font_spec_compliant_bad&type=application/octet-stream');
}
.div_arbitrary_good { font-family: "arbitrary_good"; }
@ -23,13 +23,13 @@
</head>
<body>
<!-- these should be stopped by CSP. :) -->
<img src="http://example.org/tests/content/base/test/file_CSP.sjs?testid=img_spec_compliant_bad&type=img/png"> </img>
<audio src="http://example.org/tests/content/base/test/file_CSP.sjs?testid=media_spec_compliant_bad&type=audio/vorbis"></audio>
<script src='http://example.org/tests/content/base/test/file_CSP.sjs?testid=script_spec_compliant_bad&type=text/javascript'></script>
<iframe src='http://example.org/tests/content/base/test/file_CSP.sjs?testid=frame_spec_compliant_bad&content=FAIL'></iframe>
<img src="http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=img_spec_compliant_bad&type=img/png"> </img>
<audio src="http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=media_spec_compliant_bad&type=audio/vorbis"></audio>
<script src='http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=script_spec_compliant_bad&type=text/javascript'></script>
<iframe src='http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=frame_spec_compliant_bad&content=FAIL'></iframe>
<object width="10" height="10">
<param name="movie" value="http://example.org/tests/content/base/test/file_CSP.sjs?testid=object_spec_compliant_bad&type=application/x-shockwave-flash">
<embed src="http://example.org/tests/content/base/test/file_CSP.sjs?testid=object_spec_compliant_bad&type=application/x-shockwave-flash"></embed>
<param name="movie" value="http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=object_spec_compliant_bad&type=application/x-shockwave-flash">
<embed src="http://example.org/tests/content/base/test/csp/file_CSP.sjs?testid=object_spec_compliant_bad&type=application/x-shockwave-flash"></embed>
</object>
<!-- these should load ok. :) -->

View File

@ -3,14 +3,14 @@
try {
var xhr_good = new XMLHttpRequest();
var xhr_good_uri ="http://mochi.test:8888/tests/content/base/test/file_CSP.sjs?testid=xhr_spec_compliant_good";
var xhr_good_uri ="http://mochi.test:8888/tests/content/base/test/csp/file_CSP.sjs?testid=xhr_spec_compliant_good";
xhr_good.open("GET", xhr_good_uri, true);
xhr_good.send(null);
} catch(e) {}
try {
var xhr_bad = new XMLHttpRequest();
var xhr_bad_uri ="http://example.com/tests/content/base/test/file_CSP.sjs?testid=xhr_spec_compliant_bad";
var xhr_bad_uri ="http://example.com/tests/content/base/test/csp/file_CSP.sjs?testid=xhr_spec_compliant_bad";
xhr_bad.open("GET", xhr_bad_uri, true);
xhr_bad.send(null);
} catch(e) {}

View File

@ -10,14 +10,14 @@
<link rel="stylesheet" type="text/css"
href="file_csp_bug768029.sjs?type=style&origin=same_origin" />
<link rel="stylesheet" type="text/css"
href="http://example.com/tests/content/base/test/file_csp_bug768029.sjs?type=style&origin=cross_origin" />
href="http://example.com/tests/content/base/test/csp/file_csp_bug768029.sjs?type=style&origin=cross_origin" />
</head>
<body>
<script src="file_csp_bug768029.sjs?type=script&origin=same_origin"></script>
<script src="http://example.com/tests/content/base/test/file_csp_bug768029.sjs?type=script&origin=cross_origin"></script>
<script src="http://example.com/tests/content/base/test/csp/file_csp_bug768029.sjs?type=script&origin=cross_origin"></script>
<img src="file_csp_bug768029.sjs?type=img&origin=same_origin" />
<img src="http://example.com/tests/content/base/test/file_csp_bug768029.sjs?type=img&origin=cross_origin" />
<img src="http://example.com/tests/content/base/test/csp/file_csp_bug768029.sjs?type=img&origin=cross_origin" />
Test for CSP applied to (simulated) app.

View File

@ -10,14 +10,14 @@
<link rel="stylesheet" type="text/css"
href="file_csp_bug773891.sjs?type=style&origin=same_origin" />
<link rel="stylesheet" type="text/css"
href="http://example.com/tests/content/base/test/file_csp_bug773891.sjs?type=style&origin=cross_origin" />
href="http://example.com/tests/content/base/test/csp/file_csp_bug773891.sjs?type=style&origin=cross_origin" />
</head>
<body>
<script src="file_csp_bug773891.sjs?type=script&origin=same_origin"></script>
<script src="http://example.com/tests/content/base/test/file_csp_bug773891.sjs?type=script&origin=cross_origin"></script>
<script src="http://example.com/tests/content/base/test/csp/file_csp_bug773891.sjs?type=script&origin=cross_origin"></script>
<img src="file_csp_bug773891.sjs?type=img&origin=same_origin" />
<img src="http://example.com/tests/content/base/test/file_csp_bug773891.sjs?type=img&origin=cross_origin" />
<img src="http://example.com/tests/content/base/test/csp/file_csp_bug773891.sjs?type=img&origin=cross_origin" />
Test for CSP applied to (simulated) app.

View File

@ -9,7 +9,7 @@
<script>
var thisSite = "http://mochi.test:8888";
var otherSite = "http://example.com";
var page = "/tests/content/base/test/file_csp_redirects_page.sjs";
var page = "/tests/content/base/test/csp/file_csp_redirects_page.sjs";
var tests = { "font-src": thisSite+page+"?testid=font-src&csp=1",
"frame-src": thisSite+page+"?testid=frame-src&csp=1",

View File

@ -11,7 +11,7 @@ function handleRequest(request, response)
response.setHeader("Cache-Control", "no-cache", false);
response.setHeader("Content-Type", "text/html", false);
var resource = "/tests/content/base/test/file_csp_redirects_resource.sjs";
var resource = "/tests/content/base/test/csp/file_csp_redirects_resource.sjs";
// CSP header value
if (query["csp"] == 1) {

View File

@ -11,7 +11,7 @@ function handleRequest(request, response)
var thisSite = "http://mochi.test:8888";
var otherSite = "http://example.com";
var resource = "/tests/content/base/test/file_csp_redirects_resource.sjs";
var resource = "/tests/content/base/test/csp/file_csp_redirects_resource.sjs";
response.setHeader("Cache-Control", "no-cache", false);

View File

@ -0,0 +1,6 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -16,7 +16,7 @@
<iframe style="width:200px;height:200px;" id='cspframe2'></iframe>
<script class="testbody" type="text/javascript">
var path = "/tests/content/base/test/";
var path = "/tests/content/base/test/csp/";
// These are test results: -1 means it hasn't run,
// true/false is the pass/fail result.

View File

@ -17,7 +17,7 @@
<iframe style="width:100%;height:300px;" id='cspframe3'></iframe>
<script class="testbody" type="text/javascript">
var path = "/tests/content/base/test/";
var path = "/tests/content/base/test/csp/";
var evalScriptsThatRan = 0;
var evalScriptsBlocked = 0;

View File

@ -18,7 +18,7 @@
<iframe style="width:100%;height:300px;" id='cspframe4'></iframe>
<script class="testbody" type="text/javascript">
var path = "/tests/content/base/test/";
var path = "/tests/content/base/test/csp/";
var evalScriptsThatRan = 0;
var evalScriptsBlocked = 0;

View File

@ -16,7 +16,7 @@
<iframe style="width:100%;height:300px;" id='cspframe2'></iframe>
<script class="testbody" type="text/javascript">
var path = "/tests/content/base/test/";
var path = "/tests/content/base/test/csp/";
// These are test results: -1 means it hasn't run,
// true/false is the pass/fail result.

View File

@ -16,7 +16,7 @@
<iframe style="width:100%;height:300px;" id='cspframe3'></iframe>
<script class="testbody" type="text/javascript">
var path = "/tests/content/base/test/";
var path = "/tests/content/base/test/csp/";
var inlineScriptsThatRan = 0;
var inlineScriptsBlocked = 0;

View File

@ -15,7 +15,7 @@
<iframe style="width:100%;height:300px;" id='cspframe3'></iframe>
<script class="testbody" type="text/javascript">
var path = "/tests/content/base/test/";
var path = "/tests/content/base/test/csp/";
//////////////////////////////////////////////////////////////////////

View File

@ -35,7 +35,7 @@ var gData = [
app: "https://example.com/manifest.webapp",
appStatus: Components.interfaces.nsIPrincipal.APP_STATUS_INSTALLED,
origin: "https://example.com",
uri: "https://example.com/tests/content/base/test/file_csp_bug768029.html",
uri: "https://example.com/tests/content/base/test/csp/file_csp_bug768029.html",
statusString: "installed app",
expectedTestResults: {
max_tests: 7, /* number of bools below plus one for the status check */
@ -48,7 +48,7 @@ var gData = [
app: "https://example.com/manifest_priv.webapp",
appStatus: Components.interfaces.nsIPrincipal.APP_STATUS_PRIVILEGED,
origin: "https://example.com",
uri: "https://example.com/tests/content/base/test/file_csp_bug768029.html",
uri: "https://example.com/tests/content/base/test/csp/file_csp_bug768029.html",
statusString: "privileged app",
expectedTestResults: {
max_tests: 7, /* number of bools below plus one for the status check */
@ -61,7 +61,7 @@ var gData = [
app: "https://example.com/manifest_cert.webapp",
appStatus: Components.interfaces.nsIPrincipal.APP_STATUS_CERTIFIED,
origin: "https://example.com",
uri: "https://example.com/tests/content/base/test/file_csp_bug768029.html",
uri: "https://example.com/tests/content/base/test/csp/file_csp_bug768029.html",
statusString: "certified app",
expectedTestResults: {
max_tests: 7, /* number of bools below plus one for the status check */

View File

@ -41,7 +41,7 @@ var gData = [
appStatus: Components.interfaces.nsIPrincipal.APP_STATUS_INSTALLED,
csp: MANIFEST_CSP_INST,
origin: "https://example.com",
uri: "https://example.com/tests/content/base/test/file_csp_bug773891.html",
uri: "https://example.com/tests/content/base/test/csp/file_csp_bug773891.html",
statusString: "installed app",
expectedTestResults: {
max_tests: 7, /* number of bools below plus one for the status check */
@ -54,7 +54,7 @@ var gData = [
appStatus: Components.interfaces.nsIPrincipal.APP_STATUS_CERTIFIED,
csp: MANIFEST_CSP_CERT,
origin: "https://example.com",
uri: "https://example.com/tests/content/base/test/file_csp_bug773891.html",
uri: "https://example.com/tests/content/base/test/csp/file_csp_bug773891.html",
statusString: "certified app",
expectedTestResults: {
max_tests: 7, /* number of bools below plus one for the status check */
@ -67,7 +67,7 @@ var gData = [
appStatus: Components.interfaces.nsIPrincipal.APP_STATUS_PRIVILEGED,
csp: MANIFEST_CSP_PRIV,
origin: "https://example.com",
uri: "https://example.com/tests/content/base/test/file_csp_bug773891.html",
uri: "https://example.com/tests/content/base/test/csp/file_csp_bug773891.html",
statusString: "privileged app",
expectedTestResults: {
max_tests: 7, /* number of bools below plus one for the status check */

View File

@ -15,7 +15,7 @@
<pre id="log"></pre>
<script class="testbody" type="text/javascript">
var path = "/tests/content/base/test/";
var path = "/tests/content/base/test/csp/";
// debugging
function log(s) {

View File

@ -4,7 +4,11 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += ['chrome', 'websocket_hybi']
DIRS += [
'chrome',
'csp',
'websocket_hybi',
]
MODULE = 'content'

View File

@ -16,11 +16,11 @@
"content/base/test/test_CrossSiteXHR.html": "",
"content/base/test/test_CrossSiteXHR_cache.html": "",
"content/base/test/test_CrossSiteXHR_origin.html": "",
"content/base/test/test_CSP.html": "TIMED_OUT",
"content/base/test/test_CSP_frameancestors.html": "",
"content/base/test/test_CSP_inlinescript.html": "",
"content/base/test/test_CSP_evalscript_getCRMFRequest.html": "bug 824652",
"content/base/test/test_csp_redirects.html": "TIMED_OUT",
"content/base/test/csp/test_CSP.html": "TIMED_OUT",
"content/base/test/csp/test_CSP_frameancestors.html": "",
"content/base/test/csp/test_CSP_inlinescript.html": "",
"content/base/test/csp/test_CSP_evalscript_getCRMFRequest.html": "bug 824652",
"content/base/test/csp/test_csp_redirects.html": "TIMED_OUT",
"content/base/test/test_fileapi_slice.html": "bug 775227",
"content/base/test/test_mozfiledataurl.html": "TIMED_OUT",
"content/base/test/test_mixed_content_blocker.html": "TIMED_OUT, SSL_REQUIRED",

View File

@ -17,11 +17,11 @@
"content/base/test/test_CrossSiteXHR.html": "",
"content/base/test/test_CrossSiteXHR_cache.html": "",
"content/base/test/test_CrossSiteXHR_origin.html": "",
"content/base/test/test_CSP.html": "TIMED_OUT",
"content/base/test/test_CSP_frameancestors.html": "",
"content/base/test/test_CSP_inlinescript.html": "",
"content/base/test/test_CSP_evalscript_getCRMFRequest.html": "bug 824652",
"content/base/test/test_csp_redirects.html": "TIMED_OUT",
"content/base/test/csp/test_CSP.html": "TIMED_OUT",
"content/base/test/csp/test_CSP_frameancestors.html": "",
"content/base/test/csp/test_CSP_inlinescript.html": "",
"content/base/test/csp/test_CSP_evalscript_getCRMFRequest.html": "bug 824652",
"content/base/test/csp/test_csp_redirects.html": "TIMED_OUT",
"content/base/test/test_fileapi_slice.html": "bug 775227",
"content/base/test/test_mozfiledataurl.html": "TIMED_OUT",
"content/base/test/test_mixed_content_blocker.html": "TIMED_OUT, SSL_REQUIRED",

View File

@ -192,10 +192,10 @@
"content/base/test/test_object.html":"needs plugin support",
"content/base/test/test_CSP_evalscript.html":"observer not working",
"content/base/test/test_CSP_evalscript_getCRMFRequest.html":"observer not working",
"content/base/test/test_CSP_frameancestors.html":"observer not working",
"content/base/test/test_CSP.html":"observer not working",
"content/base/test/csp/test_CSP_evalscript.html":"observer not working",
"content/base/test/csp/test_CSP_evalscript_getCRMFRequest.html":"observer not working",
"content/base/test/csp/test_CSP_frameancestors.html":"observer not working",
"content/base/test/csp/test_CSP.html":"observer not working",
"content/base/test/test_CrossSiteXHR_origin.html":"https not working, bug 907770",
"content/base/test/test_bug326337.html":"popup windows don't have specialpowers installed, could be solved with sendmessage/receivemessage",
@ -210,7 +210,7 @@
"content/base/test/test_bug717511.html":"",
"content/base/test/test_copypaste.xhtml":"bug 904183",
"content/base/test/test_copypaste.xul":"bug 904183",
"content/base/test/test_csp_redirects.html":"",
"content/base/test/csp/test_csp_redirects.html":"",
"content/base/test/test_fileapi_slice.html":"",
"content/base/test/test_mixed_content_blocker.html":"",
"content/base/test/test_mixed_content_blocker_bug803225.html":"",
@ -236,7 +236,7 @@
"content/svg/content/test/test_text_selection.html":"Mouse selection not workin on b2g",
"content/svg/content/test/test_SVGAnimatedImageSMILDisabled.html":"",
"content/xml/document/test/test_bug392338.html":"",
"content/base/test/test_bothCSPheaders.html":"",
"content/base/test/csp/test_bothCSPheaders.html":"",
"content/base/test/test_bug383430.html":"",
"content/base/test/test_bug422403-2.xhtml":"",
"content/base/test/test_bug424359-1.html":"",