Update web-platform-tests to revision 10168e9a5d44efbc6e7d416d1d454eb9c9f1396c

This commit is contained in:
Josh Matthews 2018-01-31 09:13:41 -05:00
parent c88dc51d03
commit 0e1caebaf4
791 changed files with 23381 additions and 5501 deletions

View file

@ -0,0 +1,43 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Media documents: image</title>
<link rel="author" title="Takayoshi Kochi" href="mailto:kochi@chromium.org">
<link rel="author" title="Michael Ventnor" href="mailto:mventnor@mozilla.com">
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#read-media">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
var t = async_test("The document for a standalone media file should have one child in the body.");
var imgwin = window.open('/images/blue.png');
// imgwin.onload doesn't work, check popup's URL to see if the loading of
// the image and creation of image document is finished.
function checkURL() {
if (imgwin.location.href.indexOf('blue.png') == -1) {
step_timeout(checkURL, 100);
return;
}
t.step(frameLoaded);
}
checkURL();
function frameLoaded() {
assert_equals(imgwin.opener, window);
assert_equals(imgwin.document.contentType, "image/png");
var imgwinChildren = imgwin.document.body.childNodes;
assert_equals(imgwinChildren.length, 1, "Body of image document has 1 child");
assert_equals(imgwinChildren[0].nodeName, "IMG", "Only child of body must be an <img> element");
assert_equals(imgwinChildren[0].namespaceURI, "http://www.w3.org/1999/xhtml",
"Only child of body must be an HTML element");
imgwin.close();
t.done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View file

@ -10,14 +10,14 @@
<div id="test1">scroll 2</div>
<script>
test(function() {
assert_equals(document.body.scrollTop, 0);
assert_equals(document.scrollingElement.scrollTop, 0);
location.hash = "test";
var scroll1 = document.body.scrollTop;
var scroll1 = document.scrollingElement.scrollTop;
assert_true(scroll1 > 0);
location.hash = "test1";
var scroll2 = document.body.scrollTop;
var scroll2 = document.scrollingElement.scrollTop;
assert_true(scroll2 > scroll1);
location.hash = ""

View file

@ -8,6 +8,7 @@
<a name="anchor1" style="position:absolute; top:200px;"></a>
<div id="id-equals-anchor" style="position:absolute; top:300px;"></div>
<a name="id-equals-anchor" style="position:absolute; top:400px;"></a>
<a name="§1" style="position:absolute; top:400px;"></a>
<div style="height:200em;"></div>
<script>
var steps = [{
@ -21,6 +22,11 @@ var steps = [{
// id still takes precedence over anchor name
assert_equals( scrollPosition(), 300 );
}
},{
fragid:'§1',
handler: function(){
assert_equals( scrollPosition(), 400 );
}
}];
function scrollPosition(){