mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
8edbabf141
CLOSED TREE Backed out changeset 9318cab3bd13 (bug 1117650) Backed out changeset aff44058c799 (bug 1117650) Backed out changeset eef01ed4d406 (bug 1117650) Backed out changeset 1b25392be437 (bug 1117650) --HG-- rename : dom/security/test/TestCSPParser.cpp => dom/base/test/TestCSPParser.cpp rename : dom/security/test/csp/chrome.ini => dom/base/test/csp/chrome.ini rename : dom/security/test/csp/file_CSP.css => dom/base/test/csp/file_CSP.css rename : dom/security/test/csp/file_CSP.sjs => dom/base/test/csp/file_CSP.sjs rename : dom/security/test/csp/file_bug663567.xsl => dom/base/test/csp/file_CSP_bug663567.xsl rename : dom/security/test/csp/file_bug663567_allows.xml => dom/base/test/csp/file_CSP_bug663567_allows.xml rename : dom/security/test/csp/file_bug663567_allows.xml^headers^ => dom/base/test/csp/file_CSP_bug663567_allows.xml^headers^ rename : dom/security/test/csp/file_bug663567_blocks.xml => dom/base/test/csp/file_CSP_bug663567_blocks.xml rename : dom/security/test/csp/file_bug663567_blocks.xml^headers^ => dom/base/test/csp/file_CSP_bug663567_blocks.xml^headers^ rename : dom/security/test/csp/file_bug802872.html => dom/base/test/csp/file_CSP_bug802872.html rename : dom/security/test/csp/file_bug802872.html^headers^ => dom/base/test/csp/file_CSP_bug802872.html^headers^ rename : dom/security/test/csp/file_bug802872.js => dom/base/test/csp/file_CSP_bug802872.js rename : dom/security/test/csp/file_bug802872.sjs => dom/base/test/csp/file_CSP_bug802872.sjs rename : dom/security/test/csp/file_bug885433_allows.html => dom/base/test/csp/file_CSP_bug885433_allows.html rename : dom/security/test/csp/file_bug885433_allows.html^headers^ => dom/base/test/csp/file_CSP_bug885433_allows.html^headers^ rename : dom/security/test/csp/file_bug885433_blocks.html => dom/base/test/csp/file_CSP_bug885433_blocks.html rename : dom/security/test/csp/file_bug885433_blocks.html^headers^ => dom/base/test/csp/file_CSP_bug885433_blocks.html^headers^ rename : dom/security/test/csp/file_bug888172.html => dom/base/test/csp/file_CSP_bug888172.html rename : dom/security/test/csp/file_bug888172.sjs => dom/base/test/csp/file_CSP_bug888172.sjs rename : dom/security/test/csp/file_bug909029_none.html => dom/base/test/csp/file_CSP_bug909029_none.html rename : dom/security/test/csp/file_bug909029_none.html^headers^ => dom/base/test/csp/file_CSP_bug909029_none.html^headers^ rename : dom/security/test/csp/file_bug909029_star.html => dom/base/test/csp/file_CSP_bug909029_star.html rename : dom/security/test/csp/file_bug909029_star.html^headers^ => dom/base/test/csp/file_CSP_bug909029_star.html^headers^ rename : dom/security/test/csp/file_bug910139.sjs => dom/base/test/csp/file_CSP_bug910139.sjs rename : dom/security/test/csp/file_bug910139.xml => dom/base/test/csp/file_CSP_bug910139.xml rename : dom/security/test/csp/file_bug910139.xsl => dom/base/test/csp/file_CSP_bug910139.xsl rename : dom/security/test/csp/file_bug941404.html => dom/base/test/csp/file_CSP_bug941404.html rename : dom/security/test/csp/file_bug941404_xhr.html => dom/base/test/csp/file_CSP_bug941404_xhr.html rename : dom/security/test/csp/file_bug941404_xhr.html^headers^ => dom/base/test/csp/file_CSP_bug941404_xhr.html^headers^ rename : dom/security/test/csp/file_evalscript_main.html => dom/base/test/csp/file_CSP_evalscript_main.html rename : dom/security/test/csp/file_evalscript_main.html^headers^ => dom/base/test/csp/file_CSP_evalscript_main.html^headers^ rename : dom/security/test/csp/file_evalscript_main.js => dom/base/test/csp/file_CSP_evalscript_main.js rename : dom/security/test/csp/file_evalscript_main_allowed.html => dom/base/test/csp/file_CSP_evalscript_main_allowed.html rename : dom/security/test/csp/file_evalscript_main_allowed.html^headers^ => dom/base/test/csp/file_CSP_evalscript_main_allowed.html^headers^ rename : dom/security/test/csp/file_evalscript_main_allowed.js => dom/base/test/csp/file_CSP_evalscript_main_allowed.js rename : dom/security/test/csp/file_frameancestors.sjs => dom/base/test/csp/file_CSP_frameancestors.sjs rename : dom/security/test/csp/file_frameancestors_main.html => dom/base/test/csp/file_CSP_frameancestors_main.html rename : dom/security/test/csp/file_frameancestors_main.js => dom/base/test/csp/file_CSP_frameancestors_main.js rename : dom/security/test/csp/file_inlinescript_main.html => dom/base/test/csp/file_CSP_inlinescript_main.html rename : dom/security/test/csp/file_inlinescript_main.html^headers^ => dom/base/test/csp/file_CSP_inlinescript_main.html^headers^ rename : dom/security/test/csp/file_inlinescript_main_allowed.html => dom/base/test/csp/file_CSP_inlinescript_main_allowed.html rename : dom/security/test/csp/file_inlinescript_main_allowed.html^headers^ => dom/base/test/csp/file_CSP_inlinescript_main_allowed.html^headers^ rename : dom/security/test/csp/file_inlinestyle_main.html => dom/base/test/csp/file_CSP_inlinestyle_main.html rename : dom/security/test/csp/file_inlinestyle_main.html^headers^ => dom/base/test/csp/file_CSP_inlinestyle_main.html^headers^ rename : dom/security/test/csp/file_inlinestyle_main_allowed.html => dom/base/test/csp/file_CSP_inlinestyle_main_allowed.html rename : dom/security/test/csp/file_inlinestyle_main_allowed.html^headers^ => dom/base/test/csp/file_CSP_inlinestyle_main_allowed.html^headers^ rename : dom/security/test/csp/file_main.html => dom/base/test/csp/file_CSP_main.html rename : dom/security/test/csp/file_main.html^headers^ => dom/base/test/csp/file_CSP_main.html^headers^ rename : dom/security/test/csp/file_main.js => dom/base/test/csp/file_CSP_main.js rename : dom/security/test/csp/file_base-uri.html => dom/base/test/csp/file_base-uri.html rename : dom/security/test/csp/file_bug836922_npolicies.html => dom/base/test/csp/file_bug836922_npolicies.html rename : dom/security/test/csp/file_bug836922_npolicies.html^headers^ => dom/base/test/csp/file_bug836922_npolicies.html^headers^ rename : dom/security/test/csp/file_bug836922_npolicies_ro_violation.sjs => dom/base/test/csp/file_bug836922_npolicies_ro_violation.sjs rename : dom/security/test/csp/file_bug836922_npolicies_violation.sjs => dom/base/test/csp/file_bug836922_npolicies_violation.sjs rename : dom/security/test/csp/file_bug886164.html => dom/base/test/csp/file_bug886164.html rename : dom/security/test/csp/file_bug886164.html^headers^ => dom/base/test/csp/file_bug886164.html^headers^ rename : dom/security/test/csp/file_bug886164_2.html => dom/base/test/csp/file_bug886164_2.html rename : dom/security/test/csp/file_bug886164_2.html^headers^ => dom/base/test/csp/file_bug886164_2.html^headers^ rename : dom/security/test/csp/file_bug886164_3.html => dom/base/test/csp/file_bug886164_3.html rename : dom/security/test/csp/file_bug886164_3.html^headers^ => dom/base/test/csp/file_bug886164_3.html^headers^ rename : dom/security/test/csp/file_bug886164_4.html => dom/base/test/csp/file_bug886164_4.html rename : dom/security/test/csp/file_bug886164_4.html^headers^ => dom/base/test/csp/file_bug886164_4.html^headers^ rename : dom/security/test/csp/file_bug886164_5.html => dom/base/test/csp/file_bug886164_5.html rename : dom/security/test/csp/file_bug886164_5.html^headers^ => dom/base/test/csp/file_bug886164_5.html^headers^ rename : dom/security/test/csp/file_bug886164_6.html => dom/base/test/csp/file_bug886164_6.html rename : dom/security/test/csp/file_bug886164_6.html^headers^ => dom/base/test/csp/file_bug886164_6.html^headers^ rename : dom/security/test/csp/file_connect-src.html => dom/base/test/csp/file_connect-src.html rename : dom/security/test/csp/file_allow_https_schemes.html => dom/base/test/csp/file_csp_allow_https_schemes.html rename : dom/security/test/csp/file_bug768029.html => dom/base/test/csp/file_csp_bug768029.html rename : dom/security/test/csp/file_bug768029.sjs => dom/base/test/csp/file_csp_bug768029.sjs rename : dom/security/test/csp/file_bug773891.html => dom/base/test/csp/file_csp_bug773891.html rename : dom/security/test/csp/file_bug773891.sjs => dom/base/test/csp/file_csp_bug773891.sjs rename : dom/security/test/csp/file_invalid_source_expression.html => dom/base/test/csp/file_csp_invalid_source_expression.html rename : dom/security/test/csp/file_path_matching.html => dom/base/test/csp/file_csp_path_matching.html rename : dom/security/test/csp/file_path_matching.js => dom/base/test/csp/file_csp_path_matching.js rename : dom/security/test/csp/file_path_matching_redirect.html => dom/base/test/csp/file_csp_path_matching_redirect.html rename : dom/security/test/csp/file_path_matching_redirect_server.sjs => dom/base/test/csp/file_csp_path_matching_redirect_server.sjs rename : dom/security/test/csp/file_redirects_main.html => dom/base/test/csp/file_csp_redirects_main.html rename : dom/security/test/csp/file_redirects_page.sjs => dom/base/test/csp/file_csp_redirects_page.sjs rename : dom/security/test/csp/file_redirects_resource.sjs => dom/base/test/csp/file_csp_redirects_resource.sjs rename : dom/security/test/csp/file_referrerdirective.html => dom/base/test/csp/file_csp_referrerdirective.html rename : dom/security/test/csp/file_report.html => dom/base/test/csp/file_csp_report.html rename : dom/security/test/csp/file_testserver.sjs => dom/base/test/csp/file_csp_testserver.sjs rename : dom/security/test/csp/file_form-action.html => dom/base/test/csp/file_form-action.html rename : dom/security/test/csp/file_hash_source.html => dom/base/test/csp/file_hash_source.html rename : dom/security/test/csp/file_hash_source.html^headers^ => dom/base/test/csp/file_hash_source.html^headers^ rename : dom/security/test/csp/file_leading_wildcard.html => dom/base/test/csp/file_leading_wildcard.html rename : dom/security/test/csp/file_multi_policy_injection_bypass.html => dom/base/test/csp/file_multi_policy_injection_bypass.html rename : dom/security/test/csp/file_multi_policy_injection_bypass.html^headers^ => dom/base/test/csp/file_multi_policy_injection_bypass.html^headers^ rename : dom/security/test/csp/file_multi_policy_injection_bypass_2.html => dom/base/test/csp/file_multi_policy_injection_bypass_2.html rename : dom/security/test/csp/file_multi_policy_injection_bypass_2.html^headers^ => dom/base/test/csp/file_multi_policy_injection_bypass_2.html^headers^ rename : dom/security/test/csp/file_nonce_source.html => dom/base/test/csp/file_nonce_source.html rename : dom/security/test/csp/file_nonce_source.html^headers^ => dom/base/test/csp/file_nonce_source.html^headers^ rename : dom/security/test/csp/file_policyuri_regression_from_multipolicy.html => dom/base/test/csp/file_policyuri_regression_from_multipolicy.html rename : dom/security/test/csp/file_policyuri_regression_from_multipolicy.html^headers^ => dom/base/test/csp/file_policyuri_regression_from_multipolicy.html^headers^ rename : dom/security/test/csp/file_policyuri_regression_from_multipolicy_policy => dom/base/test/csp/file_policyuri_regression_from_multipolicy_policy rename : dom/security/test/csp/file_redirect_content.sjs => dom/base/test/csp/file_redirect_content.sjs rename : dom/security/test/csp/file_redirect_report.sjs => dom/base/test/csp/file_redirect_report.sjs rename : dom/security/test/csp/file_report_uri_missing_in_report_only_header.html => dom/base/test/csp/file_report_uri_missing_in_report_only_header.html rename : dom/security/test/csp/file_report_uri_missing_in_report_only_header.html^headers^ => dom/base/test/csp/file_report_uri_missing_in_report_only_header.html^headers^ rename : dom/security/test/csp/file_self_none_as_hostname_confusion.html => dom/base/test/csp/file_self_none_as_hostname_confusion.html rename : dom/security/test/csp/file_self_none_as_hostname_confusion.html^headers^ => dom/base/test/csp/file_self_none_as_hostname_confusion.html^headers^ rename : dom/security/test/csp/file_subframe_run_js_if_allowed.html => dom/base/test/csp/file_subframe_run_js_if_allowed.html rename : dom/security/test/csp/file_subframe_run_js_if_allowed.html^headers^ => dom/base/test/csp/file_subframe_run_js_if_allowed.html^headers^ rename : dom/security/test/csp/file_worker_redirect.html => dom/base/test/csp/file_worker_redirect.html rename : dom/security/test/csp/file_worker_redirect.sjs => dom/base/test/csp/file_worker_redirect.sjs rename : dom/security/test/csp/mochitest.ini => dom/base/test/csp/mochitest.ini rename : dom/security/test/csp/referrerdirective.sjs => dom/base/test/csp/referrerdirective.sjs rename : dom/security/test/csp/test_301_redirect.html => dom/base/test/csp/test_301_redirect.html rename : dom/security/test/csp/test_302_redirect.html => dom/base/test/csp/test_302_redirect.html rename : dom/security/test/csp/test_303_redirect.html => dom/base/test/csp/test_303_redirect.html rename : dom/security/test/csp/test_307_redirect.html => dom/base/test/csp/test_307_redirect.html rename : dom/security/test/csp/test_CSP.html => dom/base/test/csp/test_CSP.html rename : dom/security/test/csp/test_bug663567.html => dom/base/test/csp/test_CSP_bug663567.html rename : dom/security/test/csp/test_bug802872.html => dom/base/test/csp/test_CSP_bug802872.html rename : dom/security/test/csp/test_bug885433.html => dom/base/test/csp/test_CSP_bug885433.html rename : dom/security/test/csp/test_bug888172.html => dom/base/test/csp/test_CSP_bug888172.html rename : dom/security/test/csp/test_bug909029.html => dom/base/test/csp/test_CSP_bug909029.html rename : dom/security/test/csp/test_bug910139.html => dom/base/test/csp/test_CSP_bug910139.html rename : dom/security/test/csp/test_bug941404.html => dom/base/test/csp/test_CSP_bug941404.html rename : dom/security/test/csp/test_evalscript.html => dom/base/test/csp/test_CSP_evalscript.html rename : dom/security/test/csp/test_frameancestors.html => dom/base/test/csp/test_CSP_frameancestors.html rename : dom/security/test/csp/test_inlinescript.html => dom/base/test/csp/test_CSP_inlinescript.html rename : dom/security/test/csp/test_inlinestyle.html => dom/base/test/csp/test_CSP_inlinestyle.html rename : dom/security/test/csp/test_referrerdirective.html => dom/base/test/csp/test_CSP_referrerdirective.html rename : dom/security/test/csp/test_base-uri.html => dom/base/test/csp/test_base-uri.html rename : dom/security/test/csp/test_bug836922_npolicies.html => dom/base/test/csp/test_bug836922_npolicies.html rename : dom/security/test/csp/test_bug886164.html => dom/base/test/csp/test_bug886164.html rename : dom/security/test/csp/test_bug949549.html => dom/base/test/csp/test_bug949549.html rename : dom/security/test/csp/test_connect-src.html => dom/base/test/csp/test_connect-src.html rename : dom/security/test/csp/test_allow_https_schemes.html => dom/base/test/csp/test_csp_allow_https_schemes.html rename : dom/security/test/csp/test_bug768029.html => dom/base/test/csp/test_csp_bug768029.html rename : dom/security/test/csp/test_bug773891.html => dom/base/test/csp/test_csp_bug773891.html rename : dom/security/test/csp/test_invalid_source_expression.html => dom/base/test/csp/test_csp_invalid_source_expression.html rename : dom/security/test/csp/test_path_matching.html => dom/base/test/csp/test_csp_path_matching.html rename : dom/security/test/csp/test_path_matching_redirect.html => dom/base/test/csp/test_csp_path_matching_redirect.html rename : dom/security/test/csp/test_redirects.html => dom/base/test/csp/test_csp_redirects.html rename : dom/security/test/csp/test_report.html => dom/base/test/csp/test_csp_report.html rename : dom/security/test/csp/test_form-action.html => dom/base/test/csp/test_form-action.html rename : dom/security/test/csp/test_hash_source.html => dom/base/test/csp/test_hash_source.html rename : dom/security/test/csp/test_leading_wildcard.html => dom/base/test/csp/test_leading_wildcard.html rename : dom/security/test/csp/test_multi_policy_injection_bypass.html => dom/base/test/csp/test_multi_policy_injection_bypass.html rename : dom/security/test/csp/test_nonce_source.html => dom/base/test/csp/test_nonce_source.html rename : dom/security/test/csp/test_policyuri_regression_from_multipolicy.html => dom/base/test/csp/test_policyuri_regression_from_multipolicy.html rename : dom/security/test/csp/test_report_uri_missing_in_report_only_header.html => dom/base/test/csp/test_report_uri_missing_in_report_only_header.html rename : dom/security/test/csp/test_self_none_as_hostname_confusion.html => dom/base/test/csp/test_self_none_as_hostname_confusion.html rename : dom/security/test/csp/test_subframe_run_js_if_allowed.html => dom/base/test/csp/test_subframe_run_js_if_allowed.html rename : dom/security/test/csp/test_worker_redirect.html => dom/base/test/csp/test_worker_redirect.html rename : dom/security/test/cors/file_CrossSiteXHR_cache_server.sjs => dom/base/test/file_CrossSiteXHR_cache_server.sjs rename : dom/security/test/cors/file_CrossSiteXHR_inner.html => dom/base/test/file_CrossSiteXHR_inner.html rename : dom/security/test/cors/file_CrossSiteXHR_inner.jar => dom/base/test/file_CrossSiteXHR_inner.jar rename : dom/security/test/cors/file_CrossSiteXHR_inner_data.sjs => dom/base/test/file_CrossSiteXHR_inner_data.sjs rename : dom/security/test/cors/file_CrossSiteXHR_server.sjs => dom/base/test/file_CrossSiteXHR_server.sjs rename : dom/security/test/mixedcontentblocker/file_bug803225_test_mailto.html => dom/base/test/mixedcontentblocker/bug803225_test_mailto.html rename : dom/security/test/mixedcontentblocker/file_frameNavigation.html => dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation.html rename : dom/security/test/mixedcontentblocker/file_frameNavigation_blankTarget.html => dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_blankTarget.html rename : dom/security/test/mixedcontentblocker/file_frameNavigation_grandchild.html => dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_grandchild.html rename : dom/security/test/mixedcontentblocker/file_frameNavigation_innermost.html => dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_innermost.html rename : dom/security/test/mixedcontentblocker/file_frameNavigation_secure.html => dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_secure.html rename : dom/security/test/mixedcontentblocker/file_frameNavigation_secure_grandchild.html => dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_secure_grandchild.html rename : dom/security/test/mixedcontentblocker/file_main.html => dom/base/test/mixedcontentblocker/file_mixed_content_main.html rename : dom/security/test/mixedcontentblocker/file_main_bug803225.html => dom/base/test/mixedcontentblocker/file_mixed_content_main_bug803225.html rename : dom/security/test/mixedcontentblocker/file_main_bug803225_websocket_wsh.py => dom/base/test/mixedcontentblocker/file_mixed_content_main_bug803225_websocket_wsh.py rename : dom/security/test/mixedcontentblocker/file_server.sjs => dom/base/test/mixedcontentblocker/file_mixed_content_server.sjs rename : dom/security/test/mixedcontentblocker/mochitest.ini => dom/base/test/mixedcontentblocker/mochitest.ini rename : dom/security/test/mixedcontentblocker/test_main.html => dom/base/test/mixedcontentblocker/test_mixed_content_blocker.html rename : dom/security/test/mixedcontentblocker/test_bug803225.html => dom/base/test/mixedcontentblocker/test_mixed_content_blocker_bug803225.html rename : dom/security/test/mixedcontentblocker/test_frameNavigation.html => dom/base/test/mixedcontentblocker/test_mixed_content_blocker_frameNavigation.html rename : dom/security/test/cors/test_CrossSiteXHR.html => dom/base/test/test_CrossSiteXHR.html rename : dom/security/test/cors/test_CrossSiteXHR_cache.html => dom/base/test/test_CrossSiteXHR_cache.html rename : dom/security/test/cors/test_CrossSiteXHR_origin.html => dom/base/test/test_CrossSiteXHR_origin.html rename : dom/security/test/unit/test_cspreports.js => dom/base/test/unit/test_cspreports.js
128 lines
4.6 KiB
HTML
128 lines
4.6 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<!--
|
|
Tests for Mixed Content Blocker
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=840388
|
|
-->
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Tests for Bug 840388</title>
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
|
|
<script>
|
|
var counter = 0;
|
|
var origBlockActive = SpecialPowers.getBoolPref("security.mixed_content.block_active_content");
|
|
|
|
SpecialPowers.setBoolPref("security.mixed_content.block_active_content", true);
|
|
var blockActive = SpecialPowers.getBoolPref("security.mixed_content.block_active_content");
|
|
|
|
|
|
var testsToRunInsecure = {
|
|
insecurePage_navigate_child: false,
|
|
insecurePage_navigate_grandchild: false,
|
|
};
|
|
|
|
var testsToRunSecure = {
|
|
securePage_navigate_child: false,
|
|
blankTarget: false,
|
|
};
|
|
|
|
function log(msg) {
|
|
document.getElementById("log").textContent += "\n" + msg;
|
|
}
|
|
|
|
var secureTestsStarted = false;
|
|
function checkTestsCompleted() {
|
|
for (var prop in testsToRunInsecure) {
|
|
// some test hasn't run yet so we're not done
|
|
if (!testsToRunInsecure[prop])
|
|
return;
|
|
}
|
|
// If we are here, all the insecure tests have run.
|
|
// If we haven't changed the iframe to run the secure tests, change it now.
|
|
if (!secureTestsStarted) {
|
|
document.getElementById('testing_frame').src = "https://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_secure.html";
|
|
secureTestsStarted = true;
|
|
}
|
|
for (var prop in testsToRunSecure) {
|
|
// some test hasn't run yet so we're not done
|
|
if (!testsToRunSecure[prop])
|
|
return;
|
|
}
|
|
//if the secure and insecure testsToRun are all completed, change the block mixed active content pref and run the tests again.
|
|
if(counter < 1) {
|
|
for (var prop in testsToRunSecure) {
|
|
testsToRunSecure[prop] = false;
|
|
}
|
|
for (var prop in testsToRunInsecure) {
|
|
testsToRunInsecure[prop] = false;
|
|
}
|
|
//call to change the preferences
|
|
counter++;
|
|
SpecialPowers.setBoolPref("security.mixed_content.block_active_content", false);
|
|
blockActive = SpecialPowers.getBoolPref("security.mixed_content.block_active_content");
|
|
log("blockActive set to "+blockActive+".");
|
|
secureTestsStarted = false;
|
|
document.getElementById('framediv').innerHTML = '<iframe src="http://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation.html" id="testing_frame"></iframe>';
|
|
}
|
|
else {
|
|
//set the prefs back to what they were set to originally
|
|
SpecialPowers.setBoolPref("security.mixed_content.block_active_content", origBlockActive);
|
|
SimpleTest.finish();
|
|
}
|
|
}
|
|
|
|
var firstTestDebugMessage = true;
|
|
|
|
// listen for a messages from the mixed content test harness
|
|
window.addEventListener("message", receiveMessage, false);
|
|
function receiveMessage(event) {
|
|
if(firstTestDebugMessage) {
|
|
log("blockActive set to "+blockActive);
|
|
firstTestDebugMessage = false;
|
|
}
|
|
|
|
log("test: "+event.data.test+", msg: "+event.data.msg + ".");
|
|
// test that the load type matches the pref for this type of content
|
|
// (i.e. active vs. display)
|
|
|
|
switch(event.data.test) {
|
|
|
|
case "insecurePage_navigate_child":
|
|
ok((event.data.msg == "navigated to insecure iframe on insecure page"), "navigating to insecure iframe blocked on insecure page");
|
|
testsToRunInsecure["insecurePage_navigate_child"] = true;
|
|
break;
|
|
|
|
case "insecurePage_navigate_grandchild":
|
|
ok((event.data.msg == "navigated to insecure grandchild iframe on insecure page"), "navigating to insecure grandchild iframe blocked on insecure page");
|
|
testsToRunInsecure["insecurePage_navigate_grandchild"] = true;
|
|
break;
|
|
|
|
case "securePage_navigate_child":
|
|
ok(blockActive == (event.data.msg == "navigating to insecure iframe blocked on secure page"), "navigated to insecure iframe on secure page");
|
|
testsToRunSecure["securePage_navigate_child"] = true;
|
|
break;
|
|
|
|
case "blankTarget":
|
|
ok((event.data.msg == "opened an http link with target=_blank from a secure page"), "couldn't open an http link in a new window from a secure page");
|
|
testsToRunSecure["blankTarget"] = true;
|
|
break;
|
|
|
|
}
|
|
checkTestsCompleted();
|
|
}
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="framediv">
|
|
<iframe src="http://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation.html" id="testing_frame"></iframe>
|
|
</div>
|
|
|
|
<pre id="log"></pre>
|
|
</body>
|
|
</html>
|