зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1498665 [wpt PR 13488] - Small adjustment to document.write TrustedTypes test., a=testonly
Automatic update from web-platform-testsSmall adjustment to document.write TrustedTypes test as WindowTestEnvironment writes to the DOM, breaking the test when viewed in the browser. (#13488) Also removed a duplicate test. -- wpt-commits: 72388ece045369a7b07eed7f52e582cf231b892d wpt-pr: 13488
This commit is contained in:
Родитель
ba937cf462
Коммит
4f21617257
|
@ -4,10 +4,11 @@
|
||||||
<script src="support/helper.sub.js"></script>
|
<script src="support/helper.sub.js"></script>
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
|
// TrustedHTML assignments do not throw.
|
||||||
test(t => {
|
test(t => {
|
||||||
let p = createHTML_policy(window, 1);
|
let p = createHTML_policy(window, 1);
|
||||||
let html = p.createHTML(INPUTS.HTML);
|
let html = p.createHTML(INPUTS.HTML);
|
||||||
document.write(html);
|
document.write(html);
|
||||||
assert_equals(document.body.innerText, RESULTS.HTML);
|
assert_true(document.body.innerText.indexOf(RESULTS.HTML) !== -1);
|
||||||
}, "document.write with html assigned via policy (successful URL transformation).");
|
}, "document.write with html assigned via policy (successful transformation).");
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -9,14 +9,6 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
// TrustedURL assignments do not throw.
|
|
||||||
test(t => {
|
|
||||||
let p = createHTML_policy(window, 1);
|
|
||||||
let html = p.createHTML(INPUTS.HTML);
|
|
||||||
document.write(html);
|
|
||||||
assert_equals(document.body.innerText, RESULTS.HTML);
|
|
||||||
}, "document.write with html assigned via policy (successful URL transformation).");
|
|
||||||
|
|
||||||
// String assignments throw.
|
// String assignments throw.
|
||||||
test(t => {
|
test(t => {
|
||||||
assert_throws(new TypeError(), _ => {
|
assert_throws(new TypeError(), _ => {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче