mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
7f7551ba47
--HG-- rename : content/base/test/csp/file_CSP_evalscript_main_spec_compliant.html => content/base/test/csp/file_CSP_evalscript_main.html rename : content/base/test/csp/file_CSP_evalscript_main_spec_compliant.html^headers^ => content/base/test/csp/file_CSP_evalscript_main.html^headers^ rename : content/base/test/csp/file_CSP_evalscript_main_spec_compliant_allowed.html => content/base/test/csp/file_CSP_evalscript_main_allowed.html rename : content/base/test/csp/file_CSP_evalscript_main_spec_compliant_allowed.html^headers^ => content/base/test/csp/file_CSP_evalscript_main_allowed.html^headers^ rename : content/base/test/csp/file_CSP_evalscript_main_spec_compliant_allowed_getCRMFRequest.html => content/base/test/csp/file_CSP_evalscript_main_allowed_getCRMFRequest.html rename : content/base/test/csp/file_CSP_evalscript_main_spec_compliant_allowed_getCRMFRequest.html^headers^ => content/base/test/csp/file_CSP_evalscript_main_allowed_getCRMFRequest.html^headers^ rename : content/base/test/csp/file_CSP_frameancestors_spec_compliant.sjs => content/base/test/csp/file_CSP_frameancestors.sjs rename : content/base/test/csp/file_CSP_frameancestors_main_spec_compliant.html => content/base/test/csp/file_CSP_frameancestors_main.html rename : content/base/test/csp/file_CSP_frameancestors_main_spec_compliant.js => content/base/test/csp/file_CSP_frameancestors_main.js rename : content/base/test/csp/file_CSP_inlinescript_main_spec_compliant.html => content/base/test/csp/file_CSP_inlinescript_main.html rename : content/base/test/csp/file_CSP_inlinescript_main_spec_compliant.html^headers^ => content/base/test/csp/file_CSP_inlinescript_main.html^headers^ rename : content/base/test/csp/file_CSP_inlinescript_main_spec_compliant_allowed.html => content/base/test/csp/file_CSP_inlinescript_main_allowed.html rename : content/base/test/csp/file_CSP_inlinescript_main_spec_compliant_allowed.html^headers^ => content/base/test/csp/file_CSP_inlinescript_main_allowed.html^headers^ rename : content/base/test/csp/file_CSP_inlinestyle_main_spec_compliant.html => content/base/test/csp/file_CSP_inlinestyle_main.html rename : content/base/test/csp/file_CSP_inlinestyle_main_spec_compliant.html^headers^ => content/base/test/csp/file_CSP_inlinestyle_main.html^headers^ rename : content/base/test/csp/file_CSP_inlinestyle_main_spec_compliant_allowed.html => content/base/test/csp/file_CSP_inlinestyle_main_allowed.html rename : content/base/test/csp/file_CSP_inlinestyle_main_spec_compliant_allowed.html^headers^ => content/base/test/csp/file_CSP_inlinestyle_main_allowed.html^headers^ rename : content/base/test/csp/file_CSP_main_spec_compliant.html => content/base/test/csp/file_CSP_main.html rename : content/base/test/csp/file_CSP_main_spec_compliant.html^headers^ => content/base/test/csp/file_CSP_main.html^headers^ rename : content/base/test/csp/file_CSP_main_spec_compliant.js => content/base/test/csp/file_CSP_main.js
80 lines
3.1 KiB
HTML
80 lines
3.1 KiB
HTML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
<html>
|
|
<head>
|
|
<title>CSP inline script tests</title>
|
|
<!-- content= "div#linkstylediv { color: #0f0; }" -->
|
|
<link rel="stylesheet" type="text/css"
|
|
href='file_CSP.sjs?type=text/css&content=div%23linkstylediv%20%7B%20color%3A%20%230f0%3B%20%7D' />
|
|
<!-- content= "div#modifycsstextdiv { color: #0f0; }" -->
|
|
<link rel="stylesheet" type="text/css"
|
|
href='file_CSP.sjs?type=text/css&content=div%23modifycsstextdiv%20%7B%20color%3A%20%23f00%3B%20%7D' />
|
|
<script>
|
|
function cssTest() {
|
|
var elem = document.getElementById('csstextstylediv');
|
|
elem.style.cssText = "color: #00FF00;";
|
|
getComputedStyle(elem, null).color;
|
|
|
|
document.styleSheets[1].cssRules[0].style.cssText = "color: #00FF00;";
|
|
elem = document.getElementById('modifycsstextdiv');
|
|
getComputedStyle(elem, null).color;
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload='cssTest()'>
|
|
|
|
<style type="text/css">
|
|
div#inlinestylediv {
|
|
color: #FF0000;
|
|
}
|
|
</style>
|
|
|
|
<div id='linkstylediv'>Link tag (external) stylesheet test (should be green)</div>
|
|
<div id='inlinestylediv'>Inline stylesheet test (should be black)</div>
|
|
<div id='attrstylediv' style="color: #FF0000;">Attribute stylesheet test (should be black)</div>
|
|
<div id='csstextstylediv'>cssText test (should be black)</div>
|
|
<div id='modifycsstextdiv'> modify rule from style sheet via cssText(should be green) </div>
|
|
|
|
<!-- tests for SMIL stuff - animations -->
|
|
<svg xmlns="http://www.w3.org/2000/svg"
|
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
width="100%"
|
|
height="100px">
|
|
|
|
<!-- Animates XML attribute, which is mapped into style. -->
|
|
<text id="xmlTest" x="0" y="15">
|
|
This shouldn't be red since the animation should be blocked by CSP.
|
|
|
|
<animate attributeName="fill" attributeType="XML"
|
|
values="red;orange;red" dur="2s"
|
|
repeatCount="indefinite" />
|
|
</text>
|
|
|
|
<!-- Animates override value for CSS property. -->
|
|
<text id="cssOverrideTest" x="0" y="35">
|
|
This shouldn't be red since the animation should be blocked by CSP.
|
|
|
|
<animate attributeName="fill" attributeType="CSS"
|
|
values="red;orange;red" dur="2s"
|
|
repeatCount="indefinite" />
|
|
</text>
|
|
|
|
<!-- Animates override value for CSS property targeted via ID. -->
|
|
<text id="cssOverrideTestById" x="0" y="55">
|
|
This shouldn't be red since the animation should be blocked by CSP.
|
|
</text>
|
|
<animate xlink:href="#cssOverrideTestById"
|
|
attributeName="fill"
|
|
values="red;orange;red"
|
|
dur="2s" repeatCount="indefinite" />
|
|
|
|
<!-- Sets value for CSS property targeted via ID. -->
|
|
<text id="cssSetTestById" x="0" y="75">
|
|
This shouldn't be red since the <set> should be blocked by CSP.
|
|
</text>
|
|
<set xlink:href="#cssSetTestById"
|
|
attributeName="fill"
|
|
to="red" />
|
|
</svg>
|
|
</body>
|
|
</html>
|