Update web-platform-tests to revision b'468d01bbd84da2babf265c6af46947be68713440'

This commit is contained in:
WPT Sync Bot 2021-09-07 11:16:33 +00:00 committed by cybai
parent 35e95f55a1
commit 58e8ee674b
9438 changed files with 266112 additions and 106976 deletions

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>Ambiguous ampersand</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div><a href='?a=b&c=d&a0b=c&copy=1&noti=n&not=in&notin=&notin;&not;&;& &'>Link</a><p>Text: ?a=b&c=d&a0b=c&copy=1&noti=n&not=in&notin=&notin;&not;&;& &</p></div>
<script>
var markup = "<div><a href='?a=b&c=d&a0b=c&copy=1&noti=n&not=in&notin=&notin;&not;&;& &'>Link</a><p>Text: ?a=b&c=d&a0b=c&copy=1&noti=n&not=in&notin=&notin;&not;&;& &</p></div>";
for (var i = 0; i < markup.length; ++i) {
document.write(markup.charAt(i));
}
</script>
<script>
function checkDiv(div, provenance) {
test(function() {
assert_equals(div.childNodes.length, 2, "Number of elements " + provenance);
let a = div.firstChild;
let href = a.href;
let question = href.indexOf('?');
href = href.substring(question);
assert_equals(href, "?a=b&c=d&a0b=c&copy=1&noti=n&not=in&notin=%E2%88%89%C2%AC&;&%20&", "attribute " + provenance);
let p = a.nextSibling;
assert_equals(p.textContent, "Text: ?a=b&c=d&a0b=c©=1¬i=n¬=in¬in=∉¬&;& &", "text " + provenance)
}, "Check div structure: " + provenance);
}
let divs = document.getElementsByTagName("div");
test(function() {
assert_equals(divs.length, 2);
}, "Check number of divs");
checkDiv(divs[0], "network");
checkDiv(divs[1], "document.write");
</script>

View file

@ -1,6 +1,6 @@
<!DOCTYPE html>
<title>Foreign contexts with HTML tag children</title>
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
<link rel="author" href="mailto:masonf@chromium.org">
<link rel="help" href="https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inbody">
<link rel="help" href="https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign">
<script src="/resources/testharness.js"></script>

View file

@ -13,7 +13,7 @@
<div id="log"></div>
<script type="text/javascript">
function doTest(doc, tagToTest, templateInnerHTML, id, tagName, bodiesNum, footerIsNull,
function doTest(doc, tagToTest, templateInnerHTML, id, tagName, bodiesNum = null, footerIsNull,
footerId, headerIsNull, headerId) {
doc.body.innerHTML = '' +
@ -51,7 +51,7 @@ function doTest(doc, tagToTest, templateInnerHTML, id, tagName, bodiesNum, foote
assert_equals(table.caption, null, 'Table should have no caption');
if (bodiesNum) {
if (bodiesNum !== null) {
assert_equals(table.tBodies.length, bodiesNum, 'Table should have '
+ bodiesNum + ' body');
}

View file

@ -13,7 +13,7 @@
<div id="log"></div>
<script type="text/javascript">
function doTest(doc, templateInnerHTML, id, tagName, bodiesNum, footerIsNull,
function doTest(doc, templateInnerHTML, id, tagName, bodiesNum = null, footerIsNull,
headerIsNull) {
doc.body.innerHTML = '' +
@ -43,7 +43,7 @@ function doTest(doc, templateInnerHTML, id, tagName, bodiesNum, footerIsNull,
assert_equals(doc.querySelector('#tbl').caption, null, 'Table should have no caption');
assert_equals(template.content.querySelector('#' + id).tagName, tagName,
'Wrong element in the template content');
if (bodiesNum) {
if (bodiesNum !== null) {
assert_equals(table.tBodies.length, bodiesNum, 'Table should have '
+ bodiesNum + ' body');
}

View file

@ -31,8 +31,11 @@ async_test(function() {
async_test(function() {
window.addEventListener("pageshow", this.step_func_done(function(e) {
assert_equals(e.type, "pageshow");
assert_false(e.bubbles, "bubbles should be false");
assert_false(e.cancelable, "cancelable should be false");
// https://github.com/whatwg/html/issues/6794
assert_true(e.bubbles, "bubbles should be true");
assert_true(e.cancelable, "cancelable should be true");
assert_equals(e.target, document, "target should be document");
assert_true(e.isTrusted, "isTrusted should be true");
assert_class_string(e, "PageTransitionEvent");