mirror of
https://github.com/servo/servo.git
synced 2025-07-14 10:53:42 +01:00
Update web-platform-tests to revision a806d658df3bcc3f05675ad8d08a6e109177c6b0
This commit is contained in:
parent
af777fcf15
commit
23dfe7c81e
155 changed files with 2487 additions and 546 deletions
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,2 @@
|
||||||
|
[float-percentage-resolution-quirks-mode.html]
|
||||||
|
expected: FAIL
|
|
@ -0,0 +1,2 @@
|
||||||
|
[percentage-heights-quirks-node.html]
|
||||||
|
expected: FAIL
|
|
@ -71,6 +71,9 @@
|
||||||
[bottom intermediate]
|
[bottom intermediate]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[border-bottom-width end]
|
[line-height end]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[border-left-width end]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[006.html]
|
|
||||||
[Link with onclick form submit and href navigation ]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[traverse_the_history_1.html]
|
|
||||||
[Multiple history traversals from the same task]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[traverse_the_history_2.html]
|
|
||||||
[Multiple history traversals, last would be aborted]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[traverse_the_history_4.html]
|
|
||||||
[Multiple history traversals, last would be aborted]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -202,33 +202,33 @@
|
||||||
[XHTML img usemap="no-hash-name"]
|
[XHTML img usemap="no-hash-name"]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[HTML (standards) IMG usemap="no-hash-name"]
|
[HTML (quirks) IMG usemap="#"]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[HTML (standards) IMG usemap="#percent-escape-name-%41"]
|
[HTML (quirks) IMG usemap="no-hash-id"]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[HTML (standards) IMG usemap="#percent-escape-id-%41"]
|
[HTML (quirks) IMG usemap="no-hash-name"]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[HTML (standards) IMG usemap=""]
|
[HTML (quirks) IMG usemap="#no-such-map"]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[HTML (standards) IMG usemap="hash-last#"]
|
[HTML (quirks) IMG usemap="hash-last#"]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[HTML (standards) IMG usemap="no-hash-id"]
|
[HTML (quirks) IMG usemap="#different-CASE-name"]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[HTML (standards) IMG usemap="#different-CASE-name"]
|
[HTML (quirks) IMG usemap="#different-CASE-id"]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[HTML (standards) IMG usemap="#"]
|
[HTML (quirks) IMG usemap=""]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[HTML (standards) IMG usemap="#different-CASE-id"]
|
[HTML (quirks) IMG usemap="#percent-escape-name-%41"]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[HTML (standards) IMG usemap="#no-such-map"]
|
[HTML (quirks) IMG usemap="#percent-escape-id-%41"]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
[script-onerror-insertion-point-2.html]
|
|
||||||
expected: TIMEOUT
|
|
|
@ -9,3 +9,6 @@
|
||||||
[document.open should throw an InvalidStateError with XML document even when the ignore-opens-during-unload counter is greater than 0 (during pagehide event)]
|
[document.open should throw an InvalidStateError with XML document even when the ignore-opens-during-unload counter is greater than 0 (during pagehide event)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[document.open should throw an InvalidStateError with XML document even when there is an active parser executing script]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -2,18 +2,21 @@
|
||||||
[request.formData() with input: a&b&c]
|
[request.formData() with input: a&b&c]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[request.formData() with input: a=b&c=d]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[response.formData() with input: a=b&c=d&]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[request.formData() with input: _charset_=windows-1252&test=%C2x]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[response.formData() with input: &&&a=b&&&&c=d&]
|
[response.formData() with input: &&&a=b&&&&c=d&]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[response.formData() with input: a&b&c]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[request.formData() with input: &&&a=b&&&&c=d&]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[response.formData() with input: _charset_=windows-1252&test=%C2x]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[request.formData() with input: a=b&c=d&]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
||||||
[urlencoded-parser.any.worker.html]
|
[urlencoded-parser.any.worker.html]
|
||||||
[response.formData() with input: a&b&c]
|
[response.formData() with input: a&b&c]
|
||||||
|
@ -25,12 +28,15 @@
|
||||||
[request.formData() with input: &&&a=b&&&&c=d&]
|
[request.formData() with input: &&&a=b&&&&c=d&]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[request.formData() with input: _charset_=windows-1252&test=%C2x]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[response.formData() with input: a=b&c=d]
|
[response.formData() with input: a=b&c=d]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[request.formData() with input: a=b&c=d&]
|
[response.formData() with input: a=b&c=d&]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[request.formData() with input: a=b&c=d]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[response.formData() with input: &&&a=b&&&&c=d&]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
[audioparam-setValueCurve-exceptions.html]
|
[audioparam-setValueCurve-exceptions.html]
|
||||||
|
expected: ERROR
|
||||||
[< [setValueCurve\] 5 out of 6 assertions were failed.]
|
[< [setValueCurve\] 5 out of 6 assertions were failed.]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
[panner-rolloff-clamping.html]
|
|
||||||
expected: ERROR
|
|
|
@ -7,7 +7,7 @@
|
||||||
<title>blob-urls-do-not-match-self</title>
|
<title>blob-urls-do-not-match-self</title>
|
||||||
<script src="/resources/testharness.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
<script src='../support/logTest.sub.js?logs=["violated-directive=script-src"]'></script>
|
<script src='../support/logTest.sub.js?logs=["violated-directive=script-src-elem"]'></script>
|
||||||
<script src='../support/alertAssert.sub.js?alerts=[]'></script>
|
<script src='../support/alertAssert.sub.js?alerts=[]'></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<title>default-src-inline-blocked</title>
|
<title>default-src-inline-blocked</title>
|
||||||
<script src="/resources/testharness.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
<script src='../support/logTest.sub.js?logs=["violated-directive=script-src","violated-directive=script-src"]'></script>
|
<script src='../support/logTest.sub.js?logs=["violated-directive=script-src-elem","violated-directive=script-src-elem"]'></script>
|
||||||
<script src='../support/alertAssert.sub.js?alerts=[]'></script>
|
<script src='../support/alertAssert.sub.js?alerts=[]'></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<title>filesystem-urls-do-not-match-self</title>
|
<title>filesystem-urls-do-not-match-self</title>
|
||||||
<script src="/resources/testharness.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
<script src='../support/logTest.sub.js?logs=["violated-directive=script-src"]'></script>
|
<script src='../support/logTest.sub.js?logs=["violated-directive=script-src-elem"]'></script>
|
||||||
<script src="../support/alertAssert.sub.js?alerts=[]"></script>
|
<script src="../support/alertAssert.sub.js?alerts=[]"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
var t_spv = async_test("Should fire violation events for every failed violation");
|
var t_spv = async_test("Should fire violation events for every failed violation");
|
||||||
|
|
||||||
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, "script-src");
|
assert_equals(e.violatedDirective, "script-src-elem");
|
||||||
}));
|
}));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<script>
|
<script>
|
||||||
var t_spv = async_test("Should fire violation events for every failed violation");
|
var t_spv = async_test("Should fire violation events for every failed violation");
|
||||||
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, "script-src");
|
assert_equals(e.violatedDirective, "script-src-elem");
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var head = document.getElementsByTagName('head')[0];
|
var head = document.getElementsByTagName('head')[0];
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<script>
|
<script>
|
||||||
var t_spv = async_test("Should fire violation events for every failed violation");
|
var t_spv = async_test("Should fire violation events for every failed violation");
|
||||||
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, "script-src");
|
assert_equals(e.violatedDirective, "script-src-elem");
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var head = document.getElementsByTagName('head')[0];
|
var head = document.getElementsByTagName('head')[0];
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<script>
|
<script>
|
||||||
var t_spv = async_test("Should fire violation events for every failed violation");
|
var t_spv = async_test("Should fire violation events for every failed violation");
|
||||||
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, "script-src");
|
assert_equals(e.violatedDirective, "script-src-elem");
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var head = document.getElementsByTagName('head')[0];
|
var head = document.getElementsByTagName('head')[0];
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<script>
|
<script>
|
||||||
var t_spv = async_test("Should fire violation events for every failed violation");
|
var t_spv = async_test("Should fire violation events for every failed violation");
|
||||||
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, "script-src");
|
assert_equals(e.violatedDirective, "script-src-elem");
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var head = document.getElementsByTagName('head')[0];
|
var head = document.getElementsByTagName('head')[0];
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<title>combine-header-and-meta-policies</title>
|
<title>combine-header-and-meta-policies</title>
|
||||||
<script src="/resources/testharness.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
<script src='../support/logTest.sub.js?logs=["TEST COMPLETE", "violated-directive=img-src", "violated-directive=style-src"]'></script>
|
<script src='../support/logTest.sub.js?logs=["TEST COMPLETE", "violated-directive=img-src", "violated-directive=style-src-elem"]'></script>
|
||||||
<script src="../support/alertAssert.sub.js?alerts=[]"></script>
|
<script src="../support/alertAssert.sub.js?alerts=[]"></script>
|
||||||
<!-- enforcing multiple policies:
|
<!-- enforcing multiple policies:
|
||||||
Content-Security-Policy: script-src 'self' 'unsafe-inline'; connect-src 'self'; style-src 'self'
|
Content-Security-Policy: script-src 'self' 'unsafe-inline'; connect-src 'self'; style-src 'self'
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
if (e.target != element)
|
if (e.target != element)
|
||||||
return;
|
return;
|
||||||
assert_equals(e.blockedURI, "inline");
|
assert_equals(e.blockedURI, "inline");
|
||||||
assert_equals(e.effectiveDirective, "script-src");
|
assert_equals(e.effectiveDirective, "script-src-elem");
|
||||||
assert_equals(element.contentDocument.body.innerText, "", "Ensure that 'Fail' doesn't appear in the child document.");
|
assert_equals(element.contentDocument.body.innerText, "", "Ensure that 'Fail' doesn't appear in the child document.");
|
||||||
element.remove();
|
element.remove();
|
||||||
test.done();
|
test.done();
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="script-src-attr 'unsafe-inline';
|
||||||
|
script-src 'nonce-abc';">
|
||||||
|
<script nonce='abc' src="/resources/testharness.js"></script>
|
||||||
|
<script nonce='abc' src="/resources/testharnessreport.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<script nonce='abc'>
|
||||||
|
var t = async_test("Should not fire a security policy violation event");
|
||||||
|
window.addEventListener('securitypolicyviolation', t.unreached_func("Should not have fired a spv event"));
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<img src="../support/pass.png" onload="t.done()">
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,23 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="script-src-attr 'none';
|
||||||
|
script-src 'unsafe-inline' 'self';">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
var t = async_test("Should fire a security policy violation event");
|
||||||
|
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
||||||
|
assert_equals(e.violatedDirective, 'script-src-attr');
|
||||||
|
assert_equals(e.blockedURI, 'inline');
|
||||||
|
}));
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<img src="../support/pass.png" onload="t.unreached_func('Should not have executed the inline handler')">
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,29 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="script-src-elem 'self' 'unsafe-inline';
|
||||||
|
script-src-attr 'none';">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
var t = async_test("Should fire a security policy violation for the attribute");
|
||||||
|
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
||||||
|
assert_equals(e.violatedDirective, 'script-src-attr');
|
||||||
|
assert_equals(e.blockedURI, 'inline');
|
||||||
|
}));
|
||||||
|
|
||||||
|
var t1 = async_test("Should execute the inline script block");
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
t1.done();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<img src="../support/pass.png" onload="t.unreached_func('should not have run this event handler')">
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="script-src-elem 'nonce-abc' 'nonce-def';
|
||||||
|
script-src 'nonce-abc';">
|
||||||
|
<script nonce='abc' src="/resources/testharness.js"></script>
|
||||||
|
<script nonce='abc' src="/resources/testharnessreport.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<script nonce='abc'>
|
||||||
|
var t = async_test("Should not fire a security policy violation event");
|
||||||
|
window.addEventListener('securitypolicyviolation', t.unreached_func("Should not have fired a spv event"));
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script nonce='def'>
|
||||||
|
t.done();
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,31 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="script-src-elem 'nonce-abc' 'self';
|
||||||
|
script-src-attr 'unsafe-inline'">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<script nonce='abc'>
|
||||||
|
var t = async_test("Should fire a security policy violation for the attribute");
|
||||||
|
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
||||||
|
assert_equals(e.violatedDirective, 'script-src-elem');
|
||||||
|
assert_equals(e.blockedURI, 'inline');
|
||||||
|
}));
|
||||||
|
|
||||||
|
var t1 = async_test("Should execute the inline script attribute");
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
t.step_func(function() {
|
||||||
|
assert_unreached("Should not have executed the inline script block");
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<img src="../support/pass.png" onload="t1.done()">
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,28 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="script-src-elem 'nonce-abc';
|
||||||
|
script-src 'nonce-abc' 'nonce-def';">
|
||||||
|
<script nonce='abc' src="/resources/testharness.js"></script>
|
||||||
|
<script nonce='abc' src="/resources/testharnessreport.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<script nonce='abc'>
|
||||||
|
var t = async_test("Should fire a spv event");
|
||||||
|
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
||||||
|
assert_equals(e.violatedDirective, 'script-src-elem');
|
||||||
|
assert_equals(e.blockedURI, 'inline');
|
||||||
|
}));
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script nonce='def'>
|
||||||
|
t.step_func(function() {
|
||||||
|
assert_unreached("Should not have executed the inline block");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="script-src-elem 'strict-dynamic' 'nonce-abc';
|
||||||
|
script-src 'nonce-abc';">
|
||||||
|
<script nonce='abc' src="/resources/testharness.js"></script>
|
||||||
|
<script nonce='abc' src="/resources/testharnessreport.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<script nonce='abc'>
|
||||||
|
var t = async_test("Should not fire a security policy violation event");
|
||||||
|
window.addEventListener('securitypolicyviolation', t.unreached_func("Should not have fired a spv event"));
|
||||||
|
|
||||||
|
var s = document.createElement('script');
|
||||||
|
s.src = 'support/t_done.js';
|
||||||
|
document.head.appendChild(s);
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,25 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="script-src 'strict-dynamic' 'nonce-abc';
|
||||||
|
script-src-elem 'nonce-abc';">
|
||||||
|
<script nonce='abc' src="/resources/testharness.js"></script>
|
||||||
|
<script nonce='abc' src="/resources/testharnessreport.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<script nonce='abc'>
|
||||||
|
var t = async_test("Should fire a security policy violation event");
|
||||||
|
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
||||||
|
assert_equals(e.violatedDirective, "script-src-elem");
|
||||||
|
assert_equals(e.blockedURI, "{{location[scheme]}}://{{location[host]}}/content-security-policy/script-src-attr-elem/support/t_fail.js");
|
||||||
|
}));
|
||||||
|
|
||||||
|
var s = document.createElement('script');
|
||||||
|
s.src = 'support/t_fail.js';
|
||||||
|
document.head.appendChild(s);
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1 @@
|
||||||
|
t.done();
|
|
@ -0,0 +1,3 @@
|
||||||
|
t.step(function() {
|
||||||
|
assert_unreached("Should not loaded the script");
|
||||||
|
});
|
|
@ -3,7 +3,7 @@
|
||||||
var test_count = 2;
|
var test_count = 2;
|
||||||
|
|
||||||
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, "script-src");
|
assert_equals(e.violatedDirective, "script-src-elem");
|
||||||
if (--test_count <= 0) {
|
if (--test_count <= 0) {
|
||||||
t_spv.done();
|
t_spv.done();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<title>injected-inline-script-blocked</title>
|
<title>injected-inline-script-blocked</title>
|
||||||
<script nonce='abc' src="/resources/testharness.js"></script>
|
<script nonce='abc' src="/resources/testharness.js"></script>
|
||||||
<script nonce='abc' src="/resources/testharnessreport.js"></script>
|
<script nonce='abc' src="/resources/testharnessreport.js"></script>
|
||||||
<script nonce='abc' src='../support/logTest.sub.js?logs=["violated-directive=script-src",]'></script>
|
<script nonce='abc' src='../support/logTest.sub.js?logs=["violated-directive=script-src-elem",]'></script>
|
||||||
<script nonce='abc' src='../support/alertAssert.sub.js?alerts=[]'></script>
|
<script nonce='abc' src='../support/alertAssert.sub.js?alerts=[]'></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,22 @@
|
||||||
var t1 = async_test("Inline script block");
|
var t1 = async_test("Inline script block");
|
||||||
var t2 = async_test("Inline event handler");
|
var t2 = async_test("Inline event handler");
|
||||||
|
|
||||||
onload = function() {t1.done(); t2.done()}
|
onload = function() {t1.done(); t2.done();};
|
||||||
|
|
||||||
var t_spv = async_test("Should not fire policy violation events");
|
var t_spv = async_test("Should fire policy violation events");
|
||||||
var test_count = 2;
|
var block_event_fired = false;
|
||||||
|
var handler_event_fired = false;
|
||||||
window.addEventListener("securitypolicyviolation", t_spv.step_func(function(e) {
|
window.addEventListener("securitypolicyviolation", t_spv.step_func(function(e) {
|
||||||
assert_equals(e.violatedDirective, "script-src");
|
if (e.violatedDirective == "script-src-elem") {
|
||||||
if (--test_count <= 0) {
|
assert_false(block_event_fired);
|
||||||
|
block_event_fired = true;
|
||||||
|
} else if (e.violatedDirective == "script-src-attr") {
|
||||||
|
assert_false(handler_event_fired);
|
||||||
|
handler_event_fired = true;
|
||||||
|
} else {
|
||||||
|
assert_unreached("Unexpected directive broken");
|
||||||
|
}
|
||||||
|
if (block_event_fired && handler_event_fired) {
|
||||||
t_spv.done();
|
t_spv.done();
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
var t = async_test("Check that a securitypolicyviolation event is fired");
|
var t = async_test("Check that a securitypolicyviolation event is fired");
|
||||||
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
||||||
assert_equals(e.blockedURI, "inline");
|
assert_equals(e.blockedURI, "inline");
|
||||||
assert_equals(e.violatedDirective, "script-src");
|
assert_equals(e.violatedDirective, "script-src-elem");
|
||||||
}));
|
}));
|
||||||
|
|
||||||
window.open('javascript:test(function() { assert_unreached("FAIL")});', 'new');
|
window.open('javascript:test(function() { assert_unreached("FAIL")});', 'new');
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<script nonce="abc">
|
<script nonce="abc">
|
||||||
var t_spv = async_test("Should fire securitypolicyviolation event");
|
var t_spv = async_test("Should fire securitypolicyviolation event");
|
||||||
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, "script-src");
|
assert_equals(e.violatedDirective, "script-src-elem");
|
||||||
assert_equals(e.disposition, "report");
|
assert_equals(e.disposition, "report");
|
||||||
}));
|
}));
|
||||||
var externalRan = false;
|
var externalRan = false;
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
var t = async_test("Test that script executes if allowed by proper hash values");
|
var t = async_test("Test that script executes if allowed by proper hash values");
|
||||||
var t_spv = async_test("Test that the securitypolicyviolation event is fired");
|
var t_spv = async_test("Test that the securitypolicyviolation event is fired");
|
||||||
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, "script-src");
|
assert_equals(e.violatedDirective, "script-src-elem");
|
||||||
assert_equals(e.disposition, "report");
|
assert_equals(e.disposition, "report");
|
||||||
assert_equals(e.blockedURI, "inline");
|
assert_equals(e.blockedURI, "inline");
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
||||||
assert_equals(e.effectiveDirective, 'script-src');
|
assert_equals(e.effectiveDirective, 'script-src-elem');
|
||||||
}));
|
}));
|
||||||
}, 'Whitelisted script without a correct nonce is not allowed with `strict-dynamic`.');
|
}, 'Whitelisted script without a correct nonce is not allowed with `strict-dynamic`.');
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
if (violation.blockedURI.split('?')[1] !== 'unNonced-appendChild') {
|
if (violation.blockedURI.split('?')[1] !== 'unNonced-appendChild') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
assert_equals(violation.effectiveDirective, 'script-src');
|
assert_equals(violation.effectiveDirective, 'script-src-elem');
|
||||||
t.done();
|
t.done();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
if (violation.blockedURI.split('?')[1] !== 'nonWhitelisted-appendChild') {
|
if (violation.blockedURI.split('?')[1] !== 'nonWhitelisted-appendChild') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
assert_equals(violation.effectiveDirective, 'script-src');
|
assert_equals(violation.effectiveDirective, 'script-src-elem');
|
||||||
assert_equals(violation.originalPolicy, "script-src 'self' 'nonce-dummy'");
|
assert_equals(violation.originalPolicy, "script-src 'self' 'nonce-dummy'");
|
||||||
t.done();
|
t.done();
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
if (violation.blockedURI.split('?')[1] !== 'appendChild-reportOnly') {
|
if (violation.blockedURI.split('?')[1] !== 'appendChild-reportOnly') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
assert_equals(violation.effectiveDirective, 'script-src');
|
assert_equals(violation.effectiveDirective, 'script-src-elem');
|
||||||
// Check that the violation comes from the Report-Only policy.
|
// Check that the violation comes from the Report-Only policy.
|
||||||
assert_equals(violation.originalPolicy, "script-src 'none'");
|
assert_equals(violation.originalPolicy, "script-src 'none'");
|
||||||
t.done();
|
t.done();
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
async_test(function(t) {
|
async_test(function(t) {
|
||||||
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
||||||
assert_false(javascriptUriScriptRan);
|
assert_false(javascriptUriScriptRan);
|
||||||
assert_equals(e.effectiveDirective, 'script-src');
|
assert_equals(e.effectiveDirective, 'script-src-elem');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
document.getElementById('javascriptUri').click();
|
document.getElementById('javascriptUri').click();
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<script nonce='dummy'>
|
<script nonce='dummy'>
|
||||||
async_test(function(t) {
|
async_test(function(t) {
|
||||||
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
||||||
assert_equals(e.effectiveDirective, 'script-src');
|
assert_equals(e.effectiveDirective, 'script-src-elem');
|
||||||
}));
|
}));
|
||||||
}, 'All the expected CSP violation reports have been fired.');
|
}, 'All the expected CSP violation reports have been fired.');
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
if (violation.blockedURI.split('?')[1] !== 'documentWrite') {
|
if (violation.blockedURI.split('?')[1] !== 'documentWrite') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
assert_equals(violation.effectiveDirective, 'script-src');
|
assert_equals(violation.effectiveDirective, 'script-src-elem');
|
||||||
t.done();
|
t.done();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
if (violation.blockedURI.split('?')[1] !== 'documentWriteln') {
|
if (violation.blockedURI.split('?')[1] !== 'documentWriteln') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
assert_equals(violation.effectiveDirective, 'script-src');
|
assert_equals(violation.effectiveDirective, 'script-src-elem');
|
||||||
t.done();
|
t.done();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
if (violation.blockedURI.split('?')[1] !== 'documentWrite-deferred') {
|
if (violation.blockedURI.split('?')[1] !== 'documentWrite-deferred') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
assert_equals(violation.effectiveDirective, 'script-src');
|
assert_equals(violation.effectiveDirective, 'script-src-elem');
|
||||||
t.done();
|
t.done();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
if (violation.blockedURI.split('?')[1] !== 'documentWriteln-deferred') {
|
if (violation.blockedURI.split('?')[1] !== 'documentWriteln-deferred') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
assert_equals(violation.effectiveDirective, 'script-src');
|
assert_equals(violation.effectiveDirective, 'script-src-elem');
|
||||||
t.done();
|
t.done();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
if (violation.blockedURI.split('?')[1] !== 'documentWrite-async') {
|
if (violation.blockedURI.split('?')[1] !== 'documentWrite-async') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
assert_equals(violation.effectiveDirective, 'script-src');
|
assert_equals(violation.effectiveDirective, 'script-src-elem');
|
||||||
t.done();
|
t.done();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@
|
||||||
if (violation.blockedURI.split('?')[1] !== 'documentWriteln-async') {
|
if (violation.blockedURI.split('?')[1] !== 'documentWriteln-async') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
assert_equals(violation.effectiveDirective, 'script-src');
|
assert_equals(violation.effectiveDirective, 'script-src-elem');
|
||||||
t.done();
|
t.done();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
if (violation.blockedURI.split('?')[1] !== 'documentWrite-deferred-async') {
|
if (violation.blockedURI.split('?')[1] !== 'documentWrite-deferred-async') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
assert_equals(violation.effectiveDirective, 'script-src');
|
assert_equals(violation.effectiveDirective, 'script-src-elem');
|
||||||
t.done();
|
t.done();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
if (violation.blockedURI.split('?')[1] !== 'documentWriteln-deferred-async') {
|
if (violation.blockedURI.split('?')[1] !== 'documentWriteln-deferred-async') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
assert_equals(violation.effectiveDirective, 'script-src');
|
assert_equals(violation.effectiveDirective, 'script-src-elem');
|
||||||
t.done();
|
t.done();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
assert_false(innerHTMLScriptRan);
|
assert_false(innerHTMLScriptRan);
|
||||||
assert_equals(violation.effectiveDirective, 'script-src');
|
assert_equals(violation.effectiveDirective, 'script-src-attr');
|
||||||
t.done();
|
t.done();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
assert_false(insertAdjacentHTMLScriptRan);
|
assert_false(insertAdjacentHTMLScriptRan);
|
||||||
assert_equals(violation.effectiveDirective, 'script-src');
|
assert_equals(violation.effectiveDirective, 'script-src-attr');
|
||||||
t.done();
|
t.done();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<script nonce="nonceynonce">
|
<script nonce="nonceynonce">
|
||||||
var t_spv = async_test("Should fire securitypolicyviolation");
|
var t_spv = async_test("Should fire securitypolicyviolation");
|
||||||
window.addEventListener('securitypolicyviolation', t_spv.step_func_done(function(e) {
|
window.addEventListener('securitypolicyviolation', t_spv.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, "script-src");
|
assert_equals(e.violatedDirective, "script-src-elem");
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var matchingContent = 'Å';
|
var matchingContent = 'Å';
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
var t_alert = async_test('Expecting alerts: ["PASS (1/3)","PASS (2/3)","PASS (3/3)"]');
|
var t_alert = async_test('Expecting alerts: ["PASS (1/3)","PASS (2/3)","PASS (3/3)"]');
|
||||||
var expected_alerts = ["PASS (1/3)", "PASS (2/3)", "PASS (3/3)", "violated-directive=script-src", "violated-directive=script-src"];
|
var expected_alerts = ["PASS (1/3)", "PASS (2/3)", "PASS (3/3)", "violated-directive=script-src-elem", "violated-directive=script-src-elem"];
|
||||||
|
|
||||||
function alert_assert(msg) {
|
function alert_assert(msg) {
|
||||||
t_alert.step(function() {
|
t_alert.step(function() {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<title>scriptnonce-basic-blocked</title>
|
<title>scriptnonce-basic-blocked</title>
|
||||||
<script src="/resources/testharness.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
<script src='../support/alertAssert.sub.js?alerts=["PASS (closely-quoted nonce)","PASS (nonce w/whitespace)", "violated-directive=script-src", "violated-directive=script-src", "violated-directive=script-src"]'></script>
|
<script src='../support/alertAssert.sub.js?alerts=["PASS (closely-quoted nonce)","PASS (nonce w/whitespace)", "violated-directive=script-src-elem", "violated-directive=script-src-elem", "violated-directive=script-src-elem"]'></script>
|
||||||
<script nonce="noncynonce">
|
<script nonce="noncynonce">
|
||||||
alert_assert('PASS (closely-quoted nonce)');
|
alert_assert('PASS (closely-quoted nonce)');
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script nonce='noncynonce'>
|
<script nonce='noncynonce'>
|
||||||
var t_alert = async_test('Expecting alerts: ["PASS (1/2)","PASS (2/2)", "violated-directive=script-src"]');
|
var t_alert = async_test('Expecting alerts: ["PASS (1/2)","PASS (2/2)", "violated-directive=script-src-elem"]');
|
||||||
var expected_alerts = ["PASS (1/2)", "PASS (2/2)", "violated-directive=script-src"];
|
var expected_alerts = ["PASS (1/2)", "PASS (2/2)", "violated-directive=script-src-elem"];
|
||||||
|
|
||||||
function alert_assert(msg) {
|
function alert_assert(msg) {
|
||||||
t_alert.step(function() {
|
t_alert.step(function() {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<title>srcdoc-doesnt-bypass-script-src</title>
|
<title>srcdoc-doesnt-bypass-script-src</title>
|
||||||
<script src="/resources/testharness.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
<script src='../support/logTest.sub.js?logs=["violated-directive=script-src"]'></script>
|
<script src='../support/logTest.sub.js?logs=["violated-directive=script-src-elem"]'></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="style-src-attr 'unsafe-inline';
|
||||||
|
style-src 'none';">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script>
|
||||||
|
var t = async_test("Should apply the style attribute");
|
||||||
|
window.addEventListener('securitypolicyviolation', t.unreached_func("Should not have fired a spv event"));
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body style="background: green">
|
||||||
|
<script>
|
||||||
|
t.step(function() {
|
||||||
|
assert_true(document.body.style.length > 0);
|
||||||
|
t.done();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,27 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="style-src-attr 'none';
|
||||||
|
style-src 'unsafe-inline';">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script>
|
||||||
|
var t = async_test("Should fire a security policy violation event");
|
||||||
|
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
||||||
|
assert_equals(e.violatedDirective, 'style-src-attr');
|
||||||
|
assert_equals(e.blockedURI, 'inline');
|
||||||
|
}));
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body style="background: green">
|
||||||
|
<script>
|
||||||
|
async_test(function(test) {
|
||||||
|
assert_equals(document.body.style.length, 0);
|
||||||
|
test.done();
|
||||||
|
}, "The attribute style should not be applied");
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,33 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="style-src-elem 'unsafe-inline';
|
||||||
|
style-src-attr 'none';">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script>
|
||||||
|
var t = async_test("Should fire a security policy violation for the attribute");
|
||||||
|
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
||||||
|
assert_equals(e.violatedDirective, 'style-src-attr');
|
||||||
|
assert_equals(e.blockedURI, 'inline');
|
||||||
|
}));
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body style="background: green">
|
||||||
|
<style>
|
||||||
|
body {background: blue;}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
async_test(function(test) {
|
||||||
|
assert_equals(document.body.style.length, 0);
|
||||||
|
assert_equals(document.styleSheets.length, 1);
|
||||||
|
test.done();
|
||||||
|
}, "The attribute style should not be applied and the inline style should be applied");
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,27 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="style-src-elem 'unsafe-inline';
|
||||||
|
style-src 'none';">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script>
|
||||||
|
var t = async_test("Inline style should be applied");
|
||||||
|
window.addEventListener('securitypolicyviolation', t.unreached_func("Should not have fired a spv event"));
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<style>
|
||||||
|
body {background: green;}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
t.step(function() {
|
||||||
|
assert_equals(document.styleSheets.length, 1);
|
||||||
|
t.done();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,33 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="style-src-elem 'none';
|
||||||
|
script-src-attr 'unsafe-inline'">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script>
|
||||||
|
var t = async_test("Should fire a security policy violation for the inline block");
|
||||||
|
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
||||||
|
assert_equals(e.violatedDirective, 'style-src-elem');
|
||||||
|
assert_equals(e.blockedURI, 'inline');
|
||||||
|
}));
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body style="background: green">
|
||||||
|
<style>
|
||||||
|
body {background: blue;}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
async_test(function(test) {
|
||||||
|
assert_true(document.body.style.length > 0);
|
||||||
|
assert_equals(document.styleSheets.length, 0);
|
||||||
|
test.done();
|
||||||
|
}, "The inline style should not be applied and the attribute style should be applied");
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,30 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="style-src-elem 'none';
|
||||||
|
style-src 'unsafe-inline';">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script>
|
||||||
|
var t = async_test("Should fire a security policy violation event");
|
||||||
|
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
||||||
|
assert_equals(e.violatedDirective, 'style-src-elem');
|
||||||
|
assert_equals(e.blockedURI, 'inline');
|
||||||
|
}));
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<style>
|
||||||
|
body {background: green;}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
async_test(function(test) {
|
||||||
|
assert_equals(document.styleSheets.length, 0);
|
||||||
|
test.done();
|
||||||
|
}, "The inline style should not be applied");
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -7,7 +7,7 @@
|
||||||
<title>injected-inline-style-blocked</title>
|
<title>injected-inline-style-blocked</title>
|
||||||
<script src="/resources/testharness.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
<script src='../support/logTest.sub.js?logs=["violated-directive=style-src","PASS"]'></script>
|
<script src='../support/logTest.sub.js?logs=["violated-directive=style-src-elem","PASS"]'></script>
|
||||||
<script src="../support/alertAssert.sub.js?alerts=[]"></script>
|
<script src="../support/alertAssert.sub.js?alerts=[]"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<title>inline-style-attribute-blocked</title>
|
<title>inline-style-attribute-blocked</title>
|
||||||
<script src="/resources/testharness.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
<script src='../support/logTest.sub.js?logs=["violated-directive=style-src","PASS"]'></script>
|
<script src='../support/logTest.sub.js?logs=["violated-directive=style-src-attr","PASS"]'></script>
|
||||||
<script src="../support/alertAssert.sub.js?alerts=[]"></script>
|
<script src="../support/alertAssert.sub.js?alerts=[]"></script>
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener('securitypolicyviolation', function(e) {
|
window.addEventListener('securitypolicyviolation', function(e) {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
||||||
|
|
||||||
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals("style-src", e.violatedDirective);
|
assert_equals("style-src-elem", e.violatedDirective);
|
||||||
}));
|
}));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
||||||
|
|
||||||
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals("style-src", e.violatedDirective);
|
assert_equals("style-src-elem", e.violatedDirective);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var l = document.createElement("link");
|
var l = document.createElement("link");
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
||||||
|
|
||||||
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals("style-src", e.violatedDirective);
|
assert_equals("style-src-elem", e.violatedDirective);
|
||||||
}));
|
}));
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
||||||
|
|
||||||
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals("style-src", e.violatedDirective);
|
assert_equals("style-src-elem", e.violatedDirective);
|
||||||
}));
|
}));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
||||||
|
|
||||||
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals("style-src", e.violatedDirective);
|
assert_equals("style-src-attr", e.violatedDirective);
|
||||||
}));
|
}));
|
||||||
onload = t.step_func_done(function(e) {
|
onload = t.step_func_done(function(e) {
|
||||||
var contentEl = document.getElementById("content");
|
var contentEl = document.getElementById("content");
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
||||||
|
|
||||||
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals("style-src", e.violatedDirective);
|
assert_equals("style-src-elem", e.violatedDirective);
|
||||||
}));
|
}));
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
||||||
|
|
||||||
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals("style-src", e.violatedDirective);
|
assert_equals("style-src-elem", e.violatedDirective);
|
||||||
}));
|
}));
|
||||||
</script>
|
</script>
|
||||||
<style id="style1" nonce="not-nonceynonce"
|
<style id="style1" nonce="not-nonceynonce"
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
||||||
|
|
||||||
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals("style-src", e.violatedDirective);
|
assert_equals("style-src-elem", e.violatedDirective);
|
||||||
}));
|
}));
|
||||||
</script>
|
</script>
|
||||||
<style nonce="not-nonceynonce">
|
<style nonce="not-nonceynonce">
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
||||||
|
|
||||||
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals("style-src", e.violatedDirective);
|
assert_equals("style-src-elem", e.violatedDirective);
|
||||||
}));
|
}));
|
||||||
</script>
|
</script>
|
||||||
<link href="/content-security-policy/style-src/resources/style-src.css" rel=stylesheet type=text/css>
|
<link href="/content-security-policy/style-src/resources/style-src.css" rel=stylesheet type=text/css>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
var t_spv = async_test("Should fire a securitypolicyviolation event");
|
||||||
|
|
||||||
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals("style-src", e.violatedDirective);
|
assert_equals("style-src-elem", e.violatedDirective);
|
||||||
}));
|
}));
|
||||||
</script>
|
</script>
|
||||||
<link nonce="not-nonceynonce" href="/content-security-policy/style-src/resources/style-src.css?pipe=sub" rel=stylesheet type=text/css>
|
<link nonce="not-nonceynonce" href="/content-security-policy/style-src/resources/style-src.css?pipe=sub" rel=stylesheet type=text/css>
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
alert_assert("violated-directive=" + e.violatedDirective);
|
alert_assert("violated-directive=" + e.violatedDirective);
|
||||||
});
|
});
|
||||||
|
|
||||||
var t_alert = async_test('Expecting alerts: ["PASS: The \'p\' element\'s text is green, which means the style was correctly applied.", "violated-directive=style-src"]');
|
var t_alert = async_test('Expecting alerts: ["PASS: The \'p\' element\'s text is green, which means the style was correctly applied.", "violated-directive=style-src-elem"]');
|
||||||
var expected_alerts = ["PASS: The 'p' element's text is green, which means the style was correctly applied.", "violated-directive=style-src"];
|
var expected_alerts = ["PASS: The 'p' element's text is green, which means the style was correctly applied.", "violated-directive=style-src-elem"];
|
||||||
|
|
||||||
function alert_assert(msg) {
|
function alert_assert(msg) {
|
||||||
t_alert.step(function() {
|
t_alert.step(function() {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<script>
|
<script>
|
||||||
var t_spv = async_test("Should fire securitypolicyviolation");
|
var t_spv = async_test("Should fire securitypolicyviolation");
|
||||||
window.addEventListener('securitypolicyviolation', t_spv.step_func_done(function(e) {
|
window.addEventListener('securitypolicyviolation', t_spv.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, "style-src");
|
assert_equals(e.violatedDirective, "style-src-elem");
|
||||||
}));
|
}));
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<script>
|
<script>
|
||||||
var t_spv = async_test("Should fire securitypolicyviolation");
|
var t_spv = async_test("Should fire securitypolicyviolation");
|
||||||
window.addEventListener('securitypolicyviolation', t_spv.step_func_done(function(e) {
|
window.addEventListener('securitypolicyviolation', t_spv.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, "style-src");
|
assert_equals(e.violatedDirective, "style-src-elem");
|
||||||
}));
|
}));
|
||||||
</script>
|
</script>
|
||||||
<style nonce="noncynonce">
|
<style nonce="noncynonce">
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<script>
|
<script>
|
||||||
var t_spv = async_test("Should fire violation event");
|
var t_spv = async_test("Should fire violation event");
|
||||||
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, "script-src");
|
assert_equals(e.violatedDirective, "script-src-elem");
|
||||||
}));
|
}));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
var t1 = async_test("Test that the javascript: src is not allowed to run");
|
var t1 = async_test("Test that the javascript: src is not allowed to run");
|
||||||
|
|
||||||
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, 'script-src');
|
assert_equals(e.violatedDirective, 'script-src-elem');
|
||||||
assert_equals(e.blockedURI, 'inline');
|
assert_equals(e.blockedURI, 'inline');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
var t1 = async_test("Test that the javascript: src is not allowed to run");
|
var t1 = async_test("Test that the javascript: src is not allowed to run");
|
||||||
|
|
||||||
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, 'script-src');
|
assert_equals(e.violatedDirective, 'script-src-elem');
|
||||||
assert_equals(e.blockedURI, 'inline');
|
assert_equals(e.blockedURI, 'inline');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
window.onmessage = t1.unreached_func("Should have not received any message");
|
window.onmessage = t1.unreached_func("Should have not received any message");
|
||||||
|
|
||||||
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, 'script-src');
|
assert_equals(e.violatedDirective, 'script-src-elem');
|
||||||
assert_equals(e.blockedURI, 'inline');
|
assert_equals(e.blockedURI, 'inline');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
var t1 = async_test("Test that the javascript: src is not allowed to run");
|
var t1 = async_test("Test that the javascript: src is not allowed to run");
|
||||||
|
|
||||||
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, 'script-src');
|
assert_equals(e.violatedDirective, 'script-src-elem');
|
||||||
assert_equals(e.blockedURI, 'inline');
|
assert_equals(e.blockedURI, 'inline');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
var t1 = async_test("Test that the javascript: src is not allowed to run");
|
var t1 = async_test("Test that the javascript: src is not allowed to run");
|
||||||
|
|
||||||
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, 'script-src');
|
assert_equals(e.violatedDirective, 'script-src-elem');
|
||||||
assert_equals(e.blockedURI, 'inline');
|
assert_equals(e.blockedURI, 'inline');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
window.onmessage = t1.unreached_func("Should have not received any message");
|
window.onmessage = t1.unreached_func("Should have not received any message");
|
||||||
|
|
||||||
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, 'script-src');
|
assert_equals(e.violatedDirective, 'script-src-elem');
|
||||||
assert_equals(e.blockedURI, 'inline');
|
assert_equals(e.blockedURI, 'inline');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
var t1 = async_test("Test that the inline event handler is not allowed to run");
|
var t1 = async_test("Test that the inline event handler is not allowed to run");
|
||||||
|
|
||||||
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, 'script-src');
|
assert_equals(e.violatedDirective, 'script-src-attr');
|
||||||
assert_equals(e.blockedURI, 'inline');
|
assert_equals(e.blockedURI, 'inline');
|
||||||
}));
|
}));
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
var t1 = async_test("Test that the inline event handler is not allowed to run");
|
var t1 = async_test("Test that the inline event handler is not allowed to run");
|
||||||
|
|
||||||
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, 'script-src');
|
assert_equals(e.violatedDirective, 'script-src-attr');
|
||||||
assert_equals(e.blockedURI, 'inline');
|
assert_equals(e.blockedURI, 'inline');
|
||||||
}));
|
}));
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
var t1 = async_test("Test that the inline style attribute is blocked");
|
var t1 = async_test("Test that the inline style attribute is blocked");
|
||||||
|
|
||||||
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, 'style-src');
|
assert_equals(e.violatedDirective, 'style-src-attr');
|
||||||
assert_equals(e.blockedURI, 'inline');
|
assert_equals(e.blockedURI, 'inline');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
var t1 = async_test("Test that the inline style attribute is blocked");
|
var t1 = async_test("Test that the inline style attribute is blocked");
|
||||||
|
|
||||||
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, 'style-src');
|
assert_equals(e.violatedDirective, 'style-src-attr');
|
||||||
assert_equals(e.blockedURI, 'inline');
|
assert_equals(e.blockedURI, 'inline');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -40,5 +40,5 @@
|
||||||
|
|
||||||
create_test(ORIGIN, ORIGIN, SameSiteStatus.STRICT, "Reloaded same-host auxiliary navigations are strictly same-site.");
|
create_test(ORIGIN, ORIGIN, SameSiteStatus.STRICT, "Reloaded same-host auxiliary navigations are strictly same-site.");
|
||||||
create_test(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Reloaded subdomain auxiliary navigations are strictly same-site.");
|
create_test(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Reloaded subdomain auxiliary navigations are strictly same-site.");
|
||||||
create_test(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN, SameSiteStatus.LAX, "Reloaded ross-site auxiliary navigations are laxly same-site");
|
create_test(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN, SameSiteStatus.LAX, "Reloaded cross-site auxiliary navigations are laxly same-site");
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -83,9 +83,9 @@ simple_async.step(function (){
|
||||||
+ uuid_token, true)
|
+ uuid_token, true)
|
||||||
|
|
||||||
client.setRequestHeader('Accept', 'jewelry')
|
client.setRequestHeader('Accept', 'jewelry')
|
||||||
client.setRequestHeader('accept-language', 'nn_NO,nn,en')
|
client.setRequestHeader('accept-language', 'nn-NO,nn,en')
|
||||||
client.setRequestHeader('content-type', 'text/plain; parameter=extra')
|
client.setRequestHeader('content-type', 'text/plain; parameter=extra')
|
||||||
client.setRequestHeader('content-Language', 'nn_NO')
|
client.setRequestHeader('content-Language', 'nn-NO')
|
||||||
|
|
||||||
client.onload = simple_async.step_func(function() {
|
client.onload = simple_async.step_func(function() {
|
||||||
assert_equals(client.getResponseHeader('content-type'), "text/plain", 'content-type response header')
|
assert_equals(client.getResponseHeader('content-type'), "text/plain", 'content-type response header')
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<title>In quirks mode a float should resolve its percentage height against its first ancestor with a defined height.</title>
|
||||||
|
<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#Computing_widths_and_margins">
|
||||||
|
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html">
|
||||||
|
<p style="margin-top: 1em;">Test passes if there is a filled green square.</p>
|
||||||
|
<div style="width:100px; height:100px; background:red;">
|
||||||
|
<div>
|
||||||
|
<div></div>
|
||||||
|
<div style="float:left; width:100%; height:100%; background:green;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>CSS Containment Test: Size containment scrollbars</title>
|
||||||
|
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-size">
|
||||||
|
<link rel="match" href="reference/contain-size-scrollbars-001-ref.html">
|
||||||
|
<meta name=assert content="This test checks that the size of an element with 'contain: size' includes the scrollbars too.">
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
contain: size;
|
||||||
|
display: inline-block;
|
||||||
|
border: solid thick;
|
||||||
|
overflow: scroll;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<p>This test passes if it has the same output as the reference.</p>
|
||||||
|
<div></div>
|
|
@ -0,0 +1,13 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>CSS Containment Test: Reference file</title>
|
||||||
|
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
display: inline-block;
|
||||||
|
border: solid thick;
|
||||||
|
overflow: scroll;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<p>This test passes if it has the same output as the reference.</p>
|
||||||
|
<div></div>
|
|
@ -0,0 +1,21 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>CSS Display: parsing display with invalid values</title>
|
||||||
|
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#display-prop">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-display/#the-display-properties">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-containers">
|
||||||
|
<meta name="assert" content="display supports only the spec grammar.">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script src="/css/support/parsing-testcommon.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
test_invalid_value("display", "grid inline-grid");
|
||||||
|
test_invalid_value("display", "none grid");
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,40 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>CSS Display: parsing display with valid values</title>
|
||||||
|
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#display-prop">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-display/#the-display-properties">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-containers">
|
||||||
|
<meta name="assert" content="display supports the full spec grammar.">
|
||||||
|
<meta name="assert" content="display supports the new values 'grid | inline-grid'.">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script src="/css/support/parsing-testcommon.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
// https://drafts.csswg.org/css-grid-1/#grid-containers
|
||||||
|
test_valid_value("display", "grid");
|
||||||
|
test_valid_value("display", "inline-grid");
|
||||||
|
|
||||||
|
// https://drafts.csswg.org/css2/visuren.html#display-prop
|
||||||
|
test_valid_value("display", "inline");
|
||||||
|
test_valid_value("display", "block");
|
||||||
|
test_valid_value("display", "list-item");
|
||||||
|
test_valid_value("display", "inline-block");
|
||||||
|
test_valid_value("display", "table");
|
||||||
|
test_valid_value("display", "inline-table");
|
||||||
|
test_valid_value("display", "table-row-group");
|
||||||
|
test_valid_value("display", "table-header-group");
|
||||||
|
test_valid_value("display", "table-footer-group");
|
||||||
|
test_valid_value("display", "table-row");
|
||||||
|
test_valid_value("display", "table-column-group");
|
||||||
|
test_valid_value("display", "table-column");
|
||||||
|
test_valid_value("display", "table-cell");
|
||||||
|
test_valid_value("display", "table-caption");
|
||||||
|
test_valid_value("display", "none");
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<title>In quirks mode a flex item should resolve its percentage height against its first ancestor with a defined height.</title>
|
||||||
|
<link rel="help" href="https://quirks.spec.whatwg.org/#the-percentage-height-calculation-quirk">
|
||||||
|
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
|
||||||
|
<p style="margin-top: 1em;">Test passes if there is a filled green square.</p>
|
||||||
|
<div style="width: 200px; height: 200px;">
|
||||||
|
<div style="display: flex;">
|
||||||
|
<div style="width: 50%; height: 50%; background: green;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,45 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>CSS Grid Layout Test: parsing grid-area with invalid values</title>
|
||||||
|
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-area">
|
||||||
|
<meta name="assert" content="grid-area supports only the grammar '<grid-line> [ / <grid-line> ]{0,3}'.">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script src="/css/support/parsing-testcommon.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
test_invalid_value("grid-area", "'string'");
|
||||||
|
test_invalid_value("grid-row", "1.0");
|
||||||
|
test_invalid_value("grid-column", "1 2");
|
||||||
|
test_invalid_value("grid-row-start", "+-3");
|
||||||
|
test_invalid_value("grid-column-start", "0");
|
||||||
|
test_invalid_value("grid-row-end", "span");
|
||||||
|
test_invalid_value("grid-column-end", "sPaN");
|
||||||
|
test_invalid_value("grid-column-end", '"1st"');
|
||||||
|
test_invalid_value("grid-column-end", "1st");
|
||||||
|
|
||||||
|
test_invalid_value("grid-area", "auto / initial");
|
||||||
|
test_invalid_value("grid-row", "auto / inherit");
|
||||||
|
test_invalid_value("grid-column", "auto / unset");
|
||||||
|
|
||||||
|
test_invalid_value("grid-area", "auto / auto / auto / auto / auto");
|
||||||
|
test_invalid_value("grid-row", "1 / 2 / 3")
|
||||||
|
test_invalid_value("grid-column", "a / b / c");
|
||||||
|
test_invalid_value("grid-row-end", "span 1 / span 2");
|
||||||
|
test_invalid_value("grid-area", "auto 2 auto 4");
|
||||||
|
test_invalid_value("grid-row", "33 -A0 auto");
|
||||||
|
test_invalid_value("grid-row", "auto i 2 j span 3 k");
|
||||||
|
|
||||||
|
|
||||||
|
// https://github.com/w3c/csswg-drafts/issues/2856
|
||||||
|
test_invalid_value("grid-row-end", "1 auto");
|
||||||
|
test_invalid_value("grid-row-end", "span 1 auto");
|
||||||
|
test_invalid_value("grid-row-end", "span auto 1");
|
||||||
|
test_invalid_value("grid-row-end", "1 auto span");
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,67 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>CSS Grid Layout Test: parsing grid-area with valid values</title>
|
||||||
|
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-area">
|
||||||
|
<meta name="assert" content="grid-area supports the full grammar '<grid-line> [ / <grid-line> ]{0,3}'.">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script src="/css/support/parsing-testcommon.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
// auto
|
||||||
|
test_valid_value("grid-area", "auto", "auto / auto / auto / auto");
|
||||||
|
test_valid_value("grid-area", "AuTo", "auto / auto / auto / auto");
|
||||||
|
test_valid_value("grid-row", "auto", "auto / auto");
|
||||||
|
test_valid_value("grid-column-end", "AuTo", "auto");
|
||||||
|
|
||||||
|
// <custom-ident>
|
||||||
|
test_valid_value("grid-area", "--a", "--a / --a / --a / --a");
|
||||||
|
test_valid_value("grid-row", "-zπ", "-zπ / -zπ");
|
||||||
|
test_valid_value("grid-row-start", "AZ");
|
||||||
|
test_valid_value("grid-column-start", "-_π");
|
||||||
|
test_valid_value("grid-row-end", "_9");
|
||||||
|
|
||||||
|
|
||||||
|
// <integer> && <custom-ident>?
|
||||||
|
test_valid_value("grid-area", "1", "1 / auto / auto / auto");
|
||||||
|
test_valid_value("grid-area", "+90 -a-", "90 -a- / auto / auto / auto");
|
||||||
|
test_valid_value("grid-row", "az 2", "2 az / auto");
|
||||||
|
test_valid_value("grid-column", "9", "9 / auto");
|
||||||
|
test_valid_value("grid-column", "-19 zA", "-19 zA / auto");
|
||||||
|
test_valid_value("grid-column", "-A0 33", "33 -A0 / auto");
|
||||||
|
test_valid_value("grid-row-start", "-19");
|
||||||
|
test_valid_value("grid-row-start", "9 -Z_");
|
||||||
|
test_valid_value("grid-column-start", "+90", "90");
|
||||||
|
test_valid_value("grid-column-start", "Z -44", "-44 Z");
|
||||||
|
test_valid_value("grid-row-end", "1 -πA");
|
||||||
|
test_valid_value("grid-column-end", "π_ +5", "5 π_");
|
||||||
|
|
||||||
|
// span && [ <integer> || <custom-ident> ]
|
||||||
|
test_valid_value("grid-area", "span 2 i", "span 2 i / auto / auto / auto");
|
||||||
|
test_valid_value("grid-area", "i 2 SpAn", "span 2 i / auto / auto / auto");
|
||||||
|
test_valid_value("grid-row", "span 2", "span 2 / auto");
|
||||||
|
test_valid_value("grid-column", "i SpAn", "span i / auto");
|
||||||
|
test_valid_value("grid-row-start", "span i", "span i");
|
||||||
|
test_valid_value("grid-column-start", "SpAn i 2", "span 2 i");
|
||||||
|
test_valid_value("grid-row-end", "2 i span", "span 2 i");
|
||||||
|
test_valid_value("grid-column-end", "2 SpAn", "span 2");
|
||||||
|
|
||||||
|
// <grid-line> [ / <grid-line> ]{0,3}
|
||||||
|
test_valid_value("grid-area", "auto / i", "auto / i / auto / i");
|
||||||
|
test_valid_value("grid-area", "auto / i / 2 j", "auto / i / 2 j / i");
|
||||||
|
test_valid_value("grid-area", "auto / i / 2 j / span 3 k");
|
||||||
|
test_valid_value("grid-row", "auto / i");
|
||||||
|
test_valid_value("grid-column", "2 j / span 3 k");
|
||||||
|
|
||||||
|
|
||||||
|
// https://github.com/w3c/csswg-drafts/issues/2858
|
||||||
|
// '\\31 st' in Blink, Firefox, '1st' in Edge, '"1st"' in Safari.
|
||||||
|
test_valid_value("grid-column-end", "\\31st", ["\\31 st", "1st", '"1st"']);
|
||||||
|
test_valid_value("grid-column-end", "\\31 st", ["\\31 st", "1st", '"1st"']);
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,37 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>CSS Grid Layout Test: parsing grid-auto-columns with invalid values</title>
|
||||||
|
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-columns">
|
||||||
|
<meta name="assert" content="grid-auto-columns supports only the grammar '<track-size>+'.">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script src="/css/support/parsing-testcommon.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
// <track-breadth>
|
||||||
|
test_invalid_value("grid-auto-columns", "none");
|
||||||
|
test_invalid_value("grid-auto-columns", "-1px");
|
||||||
|
test_invalid_value("grid-auto-columns", "-4%");
|
||||||
|
|
||||||
|
// minmax( <inflexible-breadth> , <track-breadth> )
|
||||||
|
test_invalid_value("grid-auto-columns", "minmax(1px)");
|
||||||
|
test_invalid_value("grid-auto-columns", "minmax(1px, 2px, 3px)");
|
||||||
|
test_invalid_value("grid-auto-columns", "minmax(5fr, 1px)");
|
||||||
|
test_invalid_value("grid-auto-columns", "minmax(6px, -7%)");
|
||||||
|
test_invalid_value("grid-auto-columns", "minmax(8px, -9fr)");
|
||||||
|
|
||||||
|
// fit-content( <length-percentage> )
|
||||||
|
test_invalid_value("grid-auto-columns", "fit-content(-1px)");
|
||||||
|
test_invalid_value("grid-auto-columns", "fit-content(1px, 2px)");
|
||||||
|
test_invalid_value("grid-auto-columns", "fit-content(1px auto)");
|
||||||
|
|
||||||
|
// <track-size>+
|
||||||
|
test_invalid_value("grid-auto-columns", "2em / 3em");
|
||||||
|
test_invalid_value("grid-auto-columns", "auto, 10%");
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,54 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>CSS Grid Layout Test: parsing grid-auto-columns with valid values</title>
|
||||||
|
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-columns">
|
||||||
|
<meta name="assert" content="grid-auto-columns supports the full grammar '<track-size>+'.">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script src="/css/support/parsing-testcommon.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
// <track-breadth>
|
||||||
|
// <track-breadth> = <length-percentage> | <flex> | min-content | max-content | auto
|
||||||
|
test_valid_value("grid-auto-columns", "1px");
|
||||||
|
test_valid_value("grid-auto-columns", "2em");
|
||||||
|
test_valid_value("grid-auto-columns", "calc(2em + 3ex)");
|
||||||
|
test_valid_value("grid-auto-columns", "4%");
|
||||||
|
test_valid_value("grid-auto-columns", "5fr");
|
||||||
|
test_valid_value("grid-auto-columns", "min-content");
|
||||||
|
test_valid_value("grid-auto-columns", "max-content");
|
||||||
|
test_valid_value("grid-auto-columns", "auto");
|
||||||
|
|
||||||
|
// minmax( <inflexible-breadth> , <track-breadth> )
|
||||||
|
// <inflexible-breadth> = <length-percentage> | min-content | max-content | auto
|
||||||
|
test_valid_value("grid-auto-columns", "minmax(1px, 5fr)");
|
||||||
|
test_valid_value("grid-auto-columns", "minmax(2em, min-content)");
|
||||||
|
test_valid_value("grid-auto-columns", "minmax(calc(2em + 3ex), max-content)");
|
||||||
|
test_valid_value("grid-auto-columns", "minmax(4%, auto)");
|
||||||
|
test_valid_value("grid-auto-columns", "minmax(5vmin, 1px)");
|
||||||
|
test_valid_value("grid-auto-columns", "minmax(min-content, 2em)");
|
||||||
|
test_valid_value("grid-auto-columns", "minmax(max-content, calc(2em + 3ex))");
|
||||||
|
test_valid_value("grid-auto-columns", "minmax(auto, 4%)");
|
||||||
|
|
||||||
|
// fit-content( <length-percentage> )
|
||||||
|
test_valid_value("grid-auto-columns", "fit-content(1px)");
|
||||||
|
test_valid_value("grid-auto-columns", "fit-content(2em)");
|
||||||
|
test_valid_value("grid-auto-columns", "fit-content(calc(2em + 3ex))");
|
||||||
|
test_valid_value("grid-auto-columns", "fit-content(4%)");
|
||||||
|
|
||||||
|
test_valid_value("grid-auto-columns", "0px");
|
||||||
|
test_valid_value("grid-auto-columns", "0%");
|
||||||
|
test_valid_value("grid-auto-columns", "0fr");
|
||||||
|
test_valid_value("grid-auto-columns", "minmax(auto, 0%)");
|
||||||
|
test_valid_value("grid-auto-columns", "fit-content(0px)");
|
||||||
|
|
||||||
|
// <track-size>+
|
||||||
|
test_valid_value("grid-auto-columns", "1px 2px 3px 0px");
|
||||||
|
test_valid_value("grid-auto-columns", "fit-content(1px) minmax(2px, 3px) 4px");
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>CSS Grid Layout Test: parsing grid-auto-flow with invalid values</title>
|
||||||
|
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-flow">
|
||||||
|
<meta name="assert" content="grid-auto-flow supports only the grammar '[ row | column ] || dense'.">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script src="/css/support/parsing-testcommon.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
test_invalid_value("grid-auto-flow", "auto");
|
||||||
|
test_invalid_value("grid-auto-flow", "row dense column");
|
||||||
|
test_invalid_value("grid-auto-flow", "dense row dense");
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,24 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>CSS Grid Layout Test: parsing grid-auto-flow with valid values</title>
|
||||||
|
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-flow">
|
||||||
|
<meta name="assert" content="grid-auto-flow supports the full grammar '[ row | column ] || dense'.">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script src="/css/support/parsing-testcommon.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
test_valid_value("grid-auto-flow", "row");
|
||||||
|
test_valid_value("grid-auto-flow", "column");
|
||||||
|
test_valid_value("grid-auto-flow", "row dense");
|
||||||
|
test_valid_value("grid-auto-flow", "dense column", "column dense");
|
||||||
|
|
||||||
|
// Blink/WebKit "dense", Edge/Firefox "row dense"
|
||||||
|
test_valid_value("grid-auto-flow", "dense", ["dense", "row dense"]);
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,36 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>CSS Grid Layout Test: parsing grid-auto-rows with invalid values</title>
|
||||||
|
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-rows">
|
||||||
|
<meta name="assert" content="grid-auto-rows supports only the grammar '<track-size>+'.">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script src="/css/support/parsing-testcommon.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
// <track-breadth>
|
||||||
|
test_invalid_value("grid-auto-rows", "none");
|
||||||
|
test_invalid_value("grid-auto-rows", "-1px");
|
||||||
|
test_invalid_value("grid-auto-rows", "-4%");
|
||||||
|
|
||||||
|
// minmax( <inflexible-breadth> , <track-breadth> )
|
||||||
|
test_invalid_value("grid-auto-rows", "minmax(1px)");
|
||||||
|
test_invalid_value("grid-auto-rows", "minmax(1px, 2px, 3px)");
|
||||||
|
test_invalid_value("grid-auto-rows", "minmax(5fr, 1px)");
|
||||||
|
test_invalid_value("grid-auto-rows", "minmax(6px, -7%)");
|
||||||
|
|
||||||
|
// fit-content( <length-percentage> )
|
||||||
|
test_invalid_value("grid-auto-rows", "fit-content(-1px)");
|
||||||
|
test_invalid_value("grid-auto-rows", "fit-content(1px, 2px)");
|
||||||
|
test_invalid_value("grid-auto-rows", "fit-content(1px auto)");
|
||||||
|
|
||||||
|
// <track-size>+
|
||||||
|
test_invalid_value("grid-auto-rows", "2em / 3em");
|
||||||
|
test_invalid_value("grid-auto-rows", "auto, 10%");
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,54 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>CSS Grid Layout Test: parsing grid-auto-rows with valid values</title>
|
||||||
|
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-rows">
|
||||||
|
<meta name="assert" content="grid-auto-rows supports the full grammar '<track-size>+'.">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script src="/css/support/parsing-testcommon.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
// <track-breadth>
|
||||||
|
// <track-breadth> = <length-percentage> | <flex> | min-content | max-content | auto
|
||||||
|
test_valid_value("grid-auto-rows", "1px");
|
||||||
|
test_valid_value("grid-auto-rows", "2em");
|
||||||
|
test_valid_value("grid-auto-rows", "calc(2em + 3ex)");
|
||||||
|
test_valid_value("grid-auto-rows", "4%");
|
||||||
|
test_valid_value("grid-auto-rows", "5fr");
|
||||||
|
test_valid_value("grid-auto-rows", "min-content");
|
||||||
|
test_valid_value("grid-auto-rows", "max-content");
|
||||||
|
test_valid_value("grid-auto-rows", "auto");
|
||||||
|
|
||||||
|
// minmax( <inflexible-breadth> , <track-breadth> )
|
||||||
|
// <inflexible-breadth> = <length-percentage> | min-content | max-content | auto
|
||||||
|
test_valid_value("grid-auto-rows", "minmax(1px, 5fr)");
|
||||||
|
test_valid_value("grid-auto-rows", "minmax(2em, min-content)");
|
||||||
|
test_valid_value("grid-auto-rows", "minmax(calc(2em + 3ex), max-content)");
|
||||||
|
test_valid_value("grid-auto-rows", "minmax(4%, auto)");
|
||||||
|
test_valid_value("grid-auto-rows", "minmax(5vmin, 1px)");
|
||||||
|
test_valid_value("grid-auto-rows", "minmax(min-content, 2em)");
|
||||||
|
test_valid_value("grid-auto-rows", "minmax(max-content, calc(2em + 3ex))");
|
||||||
|
test_valid_value("grid-auto-rows", "minmax(auto, 4%)");
|
||||||
|
|
||||||
|
// fit-content( <length-percentage> )
|
||||||
|
test_valid_value("grid-auto-rows", "fit-content(1px)");
|
||||||
|
test_valid_value("grid-auto-rows", "fit-content(2em)");
|
||||||
|
test_valid_value("grid-auto-rows", "fit-content(calc(2em + 3ex))");
|
||||||
|
test_valid_value("grid-auto-rows", "fit-content(4%)");
|
||||||
|
|
||||||
|
test_valid_value("grid-auto-rows", "0px");
|
||||||
|
test_valid_value("grid-auto-rows", "0%");
|
||||||
|
test_valid_value("grid-auto-rows", "0fr");
|
||||||
|
test_valid_value("grid-auto-rows", "minmax(auto, 0%)");
|
||||||
|
test_valid_value("grid-auto-rows", "fit-content(0px)");
|
||||||
|
|
||||||
|
// <track-size>+
|
||||||
|
test_valid_value("grid-auto-rows", "1px 2px 3px 0px");
|
||||||
|
test_valid_value("grid-auto-rows", "fit-content(1px) minmax(2px, 3px) 4px");
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue