mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision 4333a1d2f109795547fc5e22ebfc8481fa649de7
This commit is contained in:
parent
728ebcc932
commit
8c46b67f8e
456 changed files with 10561 additions and 5108 deletions
|
@ -4,9 +4,12 @@
|
|||
onpagehide = function() {
|
||||
onpagehide = null;
|
||||
setTimeout(function() {
|
||||
parent.t.done()
|
||||
parent.t.unreached_func('setTimeout survived navigatoin');
|
||||
}, 1000);
|
||||
}
|
||||
if (parent.loaded) {
|
||||
setTimeout(function() { parent.t.done(); }, 2000);
|
||||
}
|
||||
onload = function() {
|
||||
if (!parent.loaded) {
|
||||
parent.loaded = true;
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
<title>Document salvagable state after setting pagehide handler</title>
|
||||
<script>onpagehide = function() {setTimeout(function(){document.body.innerHTML = "PASS"}, 100)}</script>
|
||||
<p>Click the link below then navigate back to this page. Shortly after returning you should see the text "PASS"</p>
|
||||
<p><A href="manual-001-1.html">Click here</a>
|
||||
<p><a href="pagehide-manual-1.html">Click here</a>
|
|
@ -1,9 +1,23 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<meta name=timeout content=long>
|
||||
<meta name="variant" content="?1-10">
|
||||
<meta name="variant" content="?11-20">
|
||||
<meta name="variant" content="?21-30">
|
||||
<meta name="variant" content="?31-40">
|
||||
<meta name="variant" content="?41-50">
|
||||
<meta name="variant" content="?51-60">
|
||||
<meta name="variant" content="?61-70">
|
||||
<meta name="variant" content="?71-80">
|
||||
<meta name="variant" content="?81-90">
|
||||
<meta name="variant" content="?91-100">
|
||||
<meta name="variant" content="?101-110">
|
||||
<meta name="variant" content="?111-120">
|
||||
<meta name="variant" content="?121-130">
|
||||
<meta name="variant" content="?131-last">
|
||||
<title>Parsing of meta refresh</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=/common/subset-tests.js></script>
|
||||
<style>
|
||||
iframe { display:none }
|
||||
</style>
|
||||
|
@ -95,7 +109,7 @@ tests_arr.forEach(function(test_obj) {
|
|||
return;
|
||||
}
|
||||
const filename = type === "<meta>" ? "refresh.sub.html" : "refresh.py";
|
||||
async_test(function(t) {
|
||||
subsetTest(async_test, function(t) {
|
||||
var iframe = document.createElement('iframe');
|
||||
t.add_cleanup(function() {
|
||||
document.body.removeChild(iframe);
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>Check processing of allow attribute in nested browsing context</title>
|
||||
<link rel="author" title="Google" href="https://www.google.com">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-iframe-allow">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/browsing-the-web.html#initialise-the-document-object">
|
||||
<link rel="help" href="https://fullscreen.spec.whatwg.org/#fullscreen-enabled-flag">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
// This returns a data URL (cross-origin with the containing document) which
|
||||
// advances a counter, and reports the counter value together with the
|
||||
// document's fullscreenEnabled state, every time it receives a postMessage.
|
||||
// Fullscreen itself is not important for this test, but the flag is a useful
|
||||
// indicator of whether a policy-controlled-feature is allowed or denied.
|
||||
function getSourceForCrossOriginPage(initial_count) {
|
||||
var page_contents = "<html><body><script>var count="+initial_count+";window.addEventListener('message',function(){parent.postMessage({'count':count++,'fullscreenEnabled':document.fullscreenEnabled},'*');});</scr"+"ipt></body></html>";
|
||||
return "data:text/html;base64,"+btoa(page_contents);
|
||||
}
|
||||
|
||||
async_test(function(t) {
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.src = getSourceForCrossOriginPage(0);
|
||||
|
||||
iframe.addEventListener('load', function() {
|
||||
// Request the fullscreenEnabled state whenever the frame loads
|
||||
iframe.contentWindow.postMessage(true,"*");
|
||||
});
|
||||
|
||||
window.addEventListener('message', this.step_func(function(msg) {
|
||||
if (msg.data.count == 0) {
|
||||
assert_false(msg.data.fullscreenEnabled, "Document inside cross-origin iframe without allow attribute should not have feature enabled");
|
||||
iframe.setAttribute("allow", "fullscreen");
|
||||
iframe.contentWindow.postMessage(true,"*"); // Request state again
|
||||
} else if (msg.data.count == 1) {
|
||||
assert_false(msg.data.fullscreenEnabled, "Feature should be denied when correct allow attribute is added, before reload");
|
||||
iframe.src = getSourceForCrossOriginPage(2); // Reload the frame
|
||||
} else if (msg.data.count == 2) {
|
||||
assert_true(msg.data.fullscreenEnabled, "Feature should be allowed when correct allow attribute is added, after reload");
|
||||
iframe.removeAttribute("allow");
|
||||
iframe.contentWindow.postMessage(true,"*"); // Request state again
|
||||
} else if (msg.data.count == 3) {
|
||||
assert_true(msg.data.fullscreenEnabled, "Feature should be allowed when allow attribute is removed, before reload");
|
||||
iframe.src = getSourceForCrossOriginPage(4); // Reload the frame
|
||||
} else if (msg.data.count == 4) {
|
||||
assert_false(msg.data.fullscreenEnabled, "Feature should be denied when allow attribute is removed, after reload");
|
||||
iframe.setAttribute("allow", "payment"); // Set allow to an unrelated feature
|
||||
iframe.src = getSourceForCrossOriginPage(5); // Reload the frame
|
||||
} else if (msg.data.count == 5) {
|
||||
assert_false(msg.data.fullscreenEnabled, "Feature should be denied with incorrect allow attribute");
|
||||
iframe.setAttribute("allow", "payment;fullscreen"); // Include fullscreen again
|
||||
iframe.src = getSourceForCrossOriginPage(6); // Reload the frame
|
||||
} else if (msg.data.count == 6) {
|
||||
assert_true(msg.data.fullscreenEnabled, "Feature should be allowed with complex allow attribute");
|
||||
t.done();
|
||||
} else {
|
||||
assert_unreached();
|
||||
}
|
||||
}));
|
||||
|
||||
document.body.appendChild(iframe);
|
||||
}, "iframe-cross-origin-allow");
|
||||
|
||||
</script>
|
|
@ -3,13 +3,21 @@
|
|||
<title>Check how allowfullscreen affects fullscreen enabled flag</title>
|
||||
<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
|
||||
<link rel="author" title="Mozilla" href="https://www.mozilla.org">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/browsers.html#initialise-the-document-object">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/browsing-the-web.html#initialise-the-document-object">
|
||||
<link rel="help" href="https://fullscreen.spec.whatwg.org/#fullscreen-enabled-flag">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
// This returns a data URL (cross-origin with the containing document) which
|
||||
// advances a counter, and reports the counter value together with the
|
||||
// document's fullscreenEnabled state, every time it receives a postMessage.
|
||||
function getSourceForCrossOriginPage(initial_count) {
|
||||
var page_contents = "<html><body><script>var count="+initial_count+";window.addEventListener('message',function(){parent.postMessage({'count':count++,'fullscreenEnabled':document.fullscreenEnabled},'*');});</scr"+"ipt></body></html>";
|
||||
return "data:text/html;base64,"+btoa(page_contents);
|
||||
}
|
||||
|
||||
async_test(function(t) {
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.src = "support/blank.htm";
|
||||
|
@ -21,13 +29,45 @@
|
|||
|
||||
assert_true(document.fullscreenEnabled, "Top level document has fullscreen enabled flag set");
|
||||
eventWatcher.wait_for("load").then(t.step_func_done(function() {
|
||||
assert_false(iframe.contentDocument.fullscreenEnabled, "Document inside iframe without allowfullscreen attribute should not have fullscreen enabled flag set");
|
||||
iframe.setAttribute("allowfullscreen", true);
|
||||
assert_true(iframe.contentDocument.fullscreenEnabled, "Fullscreen should be allowed when allowfullscreen attribute is set");
|
||||
iframe.removeAttribute("allowfullscreen");
|
||||
assert_false(iframe.contentDocument.fullscreenEnabled, "Fullscreen should be denied when allowfullscreen attribute is removed");
|
||||
assert_true(iframe.contentDocument.fullscreenEnabled, "Document inside same-origin iframe without allowfullscreen attribute should still have fullscreen enabled flag set");
|
||||
}));
|
||||
}, "iframe-allowfullscreen");
|
||||
}, "iframe-same-origin-allowfullscreen");
|
||||
|
||||
async_test(function(t) {
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.src = getSourceForCrossOriginPage(0);
|
||||
|
||||
iframe.addEventListener('load', function() {
|
||||
// Request the fullscreenEnabled state whenever the frame loads
|
||||
iframe.contentWindow.postMessage(true,"*");
|
||||
});
|
||||
|
||||
window.addEventListener('message', this.step_func(function(msg) {
|
||||
if (msg.data.count == 0) {
|
||||
assert_false(msg.data.fullscreenEnabled, "Document inside cross-origin iframe without allowfullscreen attribute should not have fullscreen enabled flag set");
|
||||
iframe.setAttribute("allowfullscreen", "");
|
||||
iframe.contentWindow.postMessage(true,"*"); // Request state again
|
||||
} else if (msg.data.count == 1) {
|
||||
assert_false(msg.data.fullscreenEnabled, "Fullscreen should be denied when allowfullscreen attribute is added, before reload");
|
||||
iframe.src = getSourceForCrossOriginPage(2); // Reload the frame
|
||||
} else if (msg.data.count == 2) {
|
||||
assert_true(msg.data.fullscreenEnabled, "Fullscreen should be allowed when allowfullscreen attribute is added, after reload");
|
||||
iframe.removeAttribute("allowfullscreen");
|
||||
iframe.contentWindow.postMessage(true,"*"); // Request state again
|
||||
} else if (msg.data.count == 3) {
|
||||
assert_true(msg.data.fullscreenEnabled, "Fullscreen should be allowed when allowfullscreen attribute is removed, before reload");
|
||||
iframe.src = getSourceForCrossOriginPage(4); // Reload the frame
|
||||
} else if (msg.data.count == 4) {
|
||||
assert_false(msg.data.fullscreenEnabled, "Fullscreen should be denied when allowfullscreen attribute is removed, after reload");
|
||||
t.done();
|
||||
}
|
||||
}));
|
||||
|
||||
document.body.appendChild(iframe);
|
||||
t.add_cleanup(function() {
|
||||
document.body.removeChild(iframe);
|
||||
});
|
||||
}, "iframe-cross-origin-allowfullscreen");
|
||||
|
||||
/* Fullscreen enabled flag with about:blank */
|
||||
|
||||
|
@ -41,7 +81,7 @@
|
|||
|
||||
test(function() {
|
||||
test_allowfullscreen_noload(function() {}, function(doc) {
|
||||
assert_false(doc.fullscreenEnabled, "Fullscreen should not be enabled without allowfullscreen attribute");
|
||||
assert_true(doc.fullscreenEnabled, "Fullscreen should still be enabled in same-origin document without allowfullscreen attribute");
|
||||
});
|
||||
}, "iframe-noload-noallowfullscreen");
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<!doctype html>
|
||||
<title>img parse a sizes attribute (display:none)</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<iframe data-desc="display:none" style="width:1000px; height:1000px" src="support/sizes-iframed.sub.html?doctype=doctype%20html&style=display:none"></iframe>
|
||||
<script src="support/parse-a-sizes-attribute.js"></script>
|
|
@ -0,0 +1,7 @@
|
|||
<!doctype html>
|
||||
<title>img parse a sizes attribute (quirks mode)</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<iframe data-desc="quirks mode" style="width:1000px; height:1000px" src="support/sizes-iframed.sub.html?doctype=----&style="></iframe>
|
||||
<script src="support/parse-a-sizes-attribute.js"></script>
|
|
@ -0,0 +1,7 @@
|
|||
<!doctype html>
|
||||
<title>img parse a sizes attribute (standards mode)</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<iframe data-desc="standards mode" style="width:1000px; height:1000px" src="support/sizes-iframed.sub.html?doctype=doctype%20html&style="></iframe>
|
||||
<script src="support/parse-a-sizes-attribute.js"></script>
|
|
@ -0,0 +1,7 @@
|
|||
<!doctype html>
|
||||
<title>img parse a sizes attribute (width:1000px)</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<iframe data-desc="width:1000px" style="width:1000px; height:1000px" src="support/sizes-iframed.sub.html?doctype=doctype%20html&style=width:1000px%3B%20height:16px"></iframe>
|
||||
<script src="support/parse-a-sizes-attribute.js"></script>
|
|
@ -1,42 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>img parse a sizes attribute</title>
|
||||
<meta name="timeout" content="long">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<iframe data-desc="standards mode" style="width:1000px; height:1000px" src="sizes-iframed.sub.html?doctype=doctype%20html&style="></iframe>
|
||||
<iframe data-desc="quirks mode" style="width:1000px; height:1000px" src="sizes-iframed.sub.html?doctype=----&style="></iframe>
|
||||
<iframe data-desc="display:none" style="width:1000px; height:1000px" src="sizes-iframed.sub.html?doctype=doctype%20html&style=display:none"></iframe>
|
||||
<iframe data-desc="width:1000px" style="width:1000px; height:1000px" src="sizes-iframed.sub.html?doctype=doctype%20html&style=width:1000px%3B%20height:16px"></iframe>
|
||||
<script>
|
||||
setup({explicit_done:true});
|
||||
|
||||
function check(p, iframe) {
|
||||
var current = p.firstElementChild;
|
||||
var ref_sizes = current.getAttribute('sizes');
|
||||
var expect = current.currentSrc;
|
||||
if (expect) {
|
||||
expect = expect.split('?')[0];
|
||||
}
|
||||
while (current = current.nextElementSibling) {
|
||||
test(function() {
|
||||
if (expect === '' || expect === null || expect === undefined) {
|
||||
assert_unreached('ref currentSrc was ' + format_value(expect));
|
||||
}
|
||||
var got = current.currentSrc;
|
||||
assert_greater_than(got.indexOf('?'), -1, 'expected a "?" in currentSrc');
|
||||
got = got.split('?')[0];
|
||||
assert_equals(got, expect);
|
||||
}, current.outerHTML + ' ref sizes=' + format_value(ref_sizes) + ' (' + iframe.getAttribute('data-desc') + ')');
|
||||
}
|
||||
}
|
||||
|
||||
onload = function() {
|
||||
[].forEach.call(document.querySelectorAll('iframe'), function(iframe) {
|
||||
[].forEach.call(iframe.contentDocument.querySelectorAll('p'), function(p) {
|
||||
check(p, iframe);
|
||||
});
|
||||
});
|
||||
done();
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,29 @@
|
|||
setup({explicit_done:true});
|
||||
|
||||
function check(p, iframe) {
|
||||
var current = p.firstElementChild;
|
||||
var ref_sizes = current.getAttribute('sizes');
|
||||
var expect = current.currentSrc;
|
||||
if (expect) {
|
||||
expect = expect.split('?')[0];
|
||||
}
|
||||
while (current = current.nextElementSibling) {
|
||||
test(function() {
|
||||
if (expect === '' || expect === null || expect === undefined) {
|
||||
assert_unreached('ref currentSrc was ' + format_value(expect));
|
||||
}
|
||||
var got = current.currentSrc;
|
||||
assert_greater_than(got.indexOf('?'), -1, 'expected a "?" in currentSrc');
|
||||
got = got.split('?')[0];
|
||||
assert_equals(got, expect);
|
||||
}, current.outerHTML + ' ref sizes=' + format_value(ref_sizes) + ' (' + iframe.getAttribute('data-desc') + ')');
|
||||
}
|
||||
}
|
||||
|
||||
onload = function() {
|
||||
var iframe = document.querySelector('iframe');
|
||||
[].forEach.call(iframe.contentDocument.querySelectorAll('p'), function(p) {
|
||||
check(p, iframe);
|
||||
});
|
||||
done();
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>textarea maxlength</title>
|
||||
<link rel="author" title="tigercosmos" href="mailto:phy.tiger@gmail.com">
|
||||
<link rel=help href="https://html.spec.whatwg.org/multipage/#attr-textarea-maxlength">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<textarea id="none"></textarea>
|
||||
<textarea id="negative" maxlength="-5"></textarea>
|
||||
<textarea id="non-numeric" maxlength="not-a-number"></textarea>
|
||||
<textarea id="assign-negative"></textarea>
|
||||
<textarea id="assign-non-numeric"></textarea>
|
||||
|
||||
<script>
|
||||
test(
|
||||
function () {
|
||||
assert_equals(document.getElementById("none").maxLength, -1);
|
||||
}, "Unset maxlength is -1");
|
||||
|
||||
test(
|
||||
function () {
|
||||
assert_equals(document.getElementById("negative").maxLength, -1);
|
||||
}, "Negative maxlength is always -1");
|
||||
|
||||
test(
|
||||
function () {
|
||||
assert_equals(document.getElementById("non-numeric").maxLength, -1);
|
||||
}, "Non-numeric maxlength is -1");
|
||||
|
||||
test(
|
||||
function () {
|
||||
assert_throws("INDEX_SIZE_ERR", function () {
|
||||
document.getElementById("assign-negative").maxLength = -5;
|
||||
});
|
||||
}, "Assigning negative integer throws IndexSizeError");
|
||||
|
||||
test(
|
||||
function () {
|
||||
document.getElementById("assign-non-numeric").maxLength = "not-a-number";
|
||||
assert_equals(document.getElementById("assign-non-numeric").maxLength, 0);
|
||||
}, "Assigning non-numeric to maxlength sets maxlength to 0");
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,51 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>textarea minlength</title>
|
||||
<link rel="author" title="tigercosmos" href="mailto:phy.tiger@gmail.com">
|
||||
<link rel=help href="https://html.spec.whatwg.org/multipage/#attr-textarea-minlength">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<textarea id="none"></textarea>
|
||||
<textarea id="negative" minlength=-5></textarea>
|
||||
<textarea id="non-numeric" minlength="not-a-number"></textarea>
|
||||
<textarea id="assign-negative"></textarea>
|
||||
<textarea id="assign-non-numeric"></textarea>
|
||||
|
||||
<script>
|
||||
test(
|
||||
function () {
|
||||
assert_equals(document.getElementById("none").minLength, -1);
|
||||
}, "Unset minlength is -1");
|
||||
|
||||
test(
|
||||
function () {
|
||||
assert_equals(document.getElementById("negative").minLength, -1);
|
||||
}, "Negative minlength is always -1");
|
||||
|
||||
test(
|
||||
function () {
|
||||
assert_equals(document.getElementById("non-numeric").minLength, -1);
|
||||
}, "Non-numeric minlength is -1");
|
||||
|
||||
test(
|
||||
function () {
|
||||
assert_throws("INDEX_SIZE_ERR", function () {
|
||||
document.getElementById("assign-negative").minLength = -5;
|
||||
});
|
||||
}, "Assigning negative integer throws IndexSizeError");
|
||||
|
||||
test(
|
||||
function () {
|
||||
document.getElementById("assign-non-numeric").minLength = "not-a-number";
|
||||
assert_equals(document.getElementById("assign-non-numeric").minLength, 0);
|
||||
}, "Assigning non-numeric to minlength sets minlength to 0");
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -3,7 +3,7 @@
|
|||
<title>import() inside compiled strings uses the appropriate nonce inside a classic script</title>
|
||||
<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me">
|
||||
|
||||
<meta http-equiv="content-security-policy" content="script-src 'nonce-correct' 'unsafe-eval' 'unsafe-hashed-attributes' 'sha256-cAMzxBL19bKt4KwKGbxy/ZOFIIjH5AmRjlVbsD5pvNw=' 'sha256-3VjoJYNK/9HJMS8rrZHlqSZgUssDY+GPyc7AU8lNM3k='">
|
||||
<meta http-equiv="content-security-policy" content="script-src 'nonce-correct' 'unsafe-eval' 'unsafe-hashes' 'sha256-cAMzxBL19bKt4KwKGbxy/ZOFIIjH5AmRjlVbsD5pvNw=' 'sha256-3VjoJYNK/9HJMS8rrZHlqSZgUssDY+GPyc7AU8lNM3k='">
|
||||
|
||||
<script nonce="correct" src="/resources/testharness.js"></script>
|
||||
<script nonce="correct" src="/resources/testharnessreport.js"></script>
|
||||
|
@ -74,7 +74,7 @@ promise_test(t => {
|
|||
|
||||
const promise = createTestPromise(t);
|
||||
|
||||
// This only works because of the 'unsafe-hashed-attributes' and the hash in the CSP policy
|
||||
// This only works because of the 'unsafe-hashes' and the hash in the CSP policy
|
||||
dummyDiv.setAttribute(
|
||||
"onclick",
|
||||
`import('../imports-a.js?label=reflected inline event handlers').then(window.continueTest, window.errorTest)`
|
||||
|
@ -91,7 +91,7 @@ promise_test(t => {
|
|||
|
||||
const promise = createTestPromise(t);
|
||||
|
||||
// This only works because of the 'unsafe-hashed-attributes' and the hash in the CSP policy
|
||||
// This only works because of the 'unsafe-hashes' and the hash in the CSP policy
|
||||
dummyDiv.setAttribute(
|
||||
"onclick",
|
||||
`import('../imports-a.js?label=inline event handlers triggered via UA code').then(window.continueTest, window.errorTest)`
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<title>import() inside compiled strings uses the appropriate nonce inside a module script</title>
|
||||
<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me">
|
||||
|
||||
<meta http-equiv="content-security-policy" content="script-src 'nonce-correct' 'unsafe-eval' 'unsafe-hashed-attributes' 'sha256-cAMzxBL19bKt4KwKGbxy/ZOFIIjH5AmRjlVbsD5pvNw=' 'sha256-3VjoJYNK/9HJMS8rrZHlqSZgUssDY+GPyc7AU8lNM3k='">
|
||||
<meta http-equiv="content-security-policy" content="script-src 'nonce-correct' 'unsafe-eval' 'unsafe-hashes' 'sha256-cAMzxBL19bKt4KwKGbxy/ZOFIIjH5AmRjlVbsD5pvNw=' 'sha256-3VjoJYNK/9HJMS8rrZHlqSZgUssDY+GPyc7AU8lNM3k='">
|
||||
|
||||
<script nonce="correct" src="/resources/testharness.js"></script>
|
||||
<script nonce="correct" src="/resources/testharnessreport.js"></script>
|
||||
|
@ -73,7 +73,7 @@ promise_test(t => {
|
|||
|
||||
const promise = createTestPromise(t);
|
||||
|
||||
// This only works because of the 'unsafe-hashed-attributes' and the hash in the CSP policy
|
||||
// This only works because of the 'unsafe-hashes' and the hash in the CSP policy
|
||||
dummyDiv.setAttribute(
|
||||
"onclick",
|
||||
`import('../imports-a.js?label=reflected inline event handlers').then(window.continueTest, window.errorTest)`
|
||||
|
@ -90,7 +90,7 @@ promise_test(t => {
|
|||
|
||||
const promise = createTestPromise(t);
|
||||
|
||||
// This only works because of the 'unsafe-hashed-attributes' and the hash in the CSP policy
|
||||
// This only works because of the 'unsafe-hashes' and the hash in the CSP policy
|
||||
dummyDiv.setAttribute(
|
||||
"onclick",
|
||||
`import('../imports-a.js?label=inline event handlers triggered via UA code').then(window.continueTest, window.errorTest)`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue