mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update web-platform-tests and CSS tests.
- Update CSS tests to revision e05bfd5e30ed662c2f8a353577003f8eed230180. - Update web-platform-tests to revision a052787dd5c069a340031011196b73affbd68cd9.
This commit is contained in:
parent
fb4f421c8b
commit
296fa2512b
21852 changed files with 2080936 additions and 892894 deletions
|
@ -4,7 +4,7 @@
|
|||
"original_id": "authoring"
|
||||
},
|
||||
{
|
||||
"id": "processing-model-0",
|
||||
"original_id": "processing-model-0"
|
||||
"id": "image-map-processing-model",
|
||||
"original_id": "image-map-processing-model"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
|
|
@ -0,0 +1,254 @@
|
|||
<!DOCTYPE {{GET[doctype]}}>
|
||||
<!-- This file should be polyglot -->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Test data for hash name reference</title>
|
||||
<style>
|
||||
body { margin: 0 }
|
||||
img, object { height: 1px; display:block }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div data-expect="no match">
|
||||
<img src="/images/threecolors.png" usemap="no-hash-name"/>
|
||||
<object data="/images/threecolors.png" usemap="no-hash-name"></object>
|
||||
<map name="no-hash-name">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-no-hash-name"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="no match">
|
||||
<img src="/images/threecolors.png" usemap="no-hash-id"/>
|
||||
<object data="/images/threecolors.png" usemap="no-hash-id"></object>
|
||||
<map id="no-hash-id">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-no-hash-id"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="area-hash-name">
|
||||
<img src="/images/threecolors.png" usemap="#hash-name"/>
|
||||
<object data="/images/threecolors.png" usemap="#hash-name"></object>
|
||||
<map name="hash-name">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-hash-name"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="area-hash-id">
|
||||
<img src="/images/threecolors.png" usemap="#hash-id"/>
|
||||
<object data="/images/threecolors.png" usemap="#hash-id"></object>
|
||||
<map id="hash-id">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-hash-id"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="area-non-map-with-this-name">
|
||||
<img src="/images/threecolors.png" usemap="#non-map-with-this-name" name="non-map-with-this-name"/>
|
||||
<object data="/images/threecolors.png" usemap="#non-map-with-this-name"></object>
|
||||
<map name="non-map-with-this-name">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-non-map-with-this-name"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="area-non-map-with-this-id">
|
||||
<img src="/images/threecolors.png" usemap="#non-map-with-this-id" id="non-map-with-this-id"/>
|
||||
<object data="/images/threecolors.png" usemap="#non-map-with-this-id"></object>
|
||||
<map id="non-map-with-this-name">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-non-map-with-this-id"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="area-two-maps-with-this-name-1">
|
||||
<img src="/images/threecolors.png" usemap="#two-maps-with-this-name"/>
|
||||
<object data="/images/threecolors.png" usemap="#two-maps-with-this-name"></object>
|
||||
<map name="two-maps-with-this-name">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-two-maps-with-this-name-1"/>
|
||||
</map>
|
||||
<map name="two-maps-with-this-name">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-two-maps-with-this-name-2"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="area-two-maps-with-this-id-1">
|
||||
<img src="/images/threecolors.png" usemap="#two-maps-with-this-id"/>
|
||||
<object data="/images/threecolors.png" usemap="#two-maps-with-this-id"></object>
|
||||
<map id="two-maps-with-this-id">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-two-maps-with-this-id-1"/>
|
||||
</map>
|
||||
<map id="two-maps-with-this-id">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-two-maps-with-this-id-2"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="area-two-maps-with-this-name-or-id-1">
|
||||
<img src="/images/threecolors.png" usemap="#two-maps-with-this-name-or-id"/>
|
||||
<object data="/images/threecolors.png" usemap="#two-maps-with-this-name-or-id"></object>
|
||||
<map name="two-maps-with-this-name-or-id">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-two-maps-with-this-name-or-id-1"/>
|
||||
</map>
|
||||
<map id="two-maps-with-this-name-or-id">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-two-maps-with-this-name-or-id-2"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="area-two-maps-with-this-id-or-name-1">
|
||||
<img src="/images/threecolors.png" usemap="#two-maps-with-this-id-or-name"/>
|
||||
<object data="/images/threecolors.png" usemap="#two-maps-with-this-id-or-name"></object>
|
||||
<map id="two-maps-with-this-id-or-name">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-two-maps-with-this-id-or-name-1"/>
|
||||
</map>
|
||||
<map name="two-maps-with-this-id-or-name">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-two-maps-with-this-id-or-name-2"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="no match">
|
||||
<img src="/images/threecolors.png" usemap="hash-last#"/>
|
||||
<object data="/images/threecolors.png" usemap="hash-last#"></object>
|
||||
<map name="hash-last" id="hash-last">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-hash-last-no-hash-in-map-name-and-id"/>
|
||||
</map>
|
||||
<map name="hash-last#" id="hash-last#">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-hash-last-with-hash-in-map-name-and-id"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="no match">
|
||||
<img src="/images/threecolors.png" usemap=""/>
|
||||
<object data="/images/threecolors.png" usemap=""></object>
|
||||
<map name="" id="">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-empty-usemap-empty-map-name-and-id"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="no match">
|
||||
<img src="/images/threecolors.png" usemap="#"/>
|
||||
<object data="/images/threecolors.png" usemap="#"></object>
|
||||
<map name="" id="">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-hash-usemap-empty-name-and-id"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="area-hash-space-usemap-space-map-name">
|
||||
<img src="/images/threecolors.png" usemap="# "/>
|
||||
<object data="/images/threecolors.png" usemap="# "></object>
|
||||
<map name=" ">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-hash-space-usemap-space-map-name"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="area-hash-LF-usemap-LF-map-id">
|
||||
<img src="/images/threecolors.png" usemap="#
"/>
|
||||
<object data="/images/threecolors.png" usemap="#
"></object>
|
||||
<map id="
">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-hash-LF-usemap-LF-map-id"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="no match">
|
||||
<img src="/images/threecolors.png" usemap="#percent-escape-name-%41"/>
|
||||
<object data="/images/threecolors.png" usemap="#percent-escape-name-%41"></object>
|
||||
<map name="percent-escape-name-A">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-percent-escape-name-A"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="no match">
|
||||
<img src="/images/threecolors.png" usemap="#percent-escape-id-%41"/>
|
||||
<object data="/images/threecolors.png" usemap="#percent-escape-id-%41"></object>
|
||||
<map id="percent-escape-id-A">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-percent-escape-id-A"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="area-percent-escape-name-B">
|
||||
<img src="/images/threecolors.png" usemap="#percent-escape-name-%42"/>
|
||||
<object data="/images/threecolors.png" usemap="#percent-escape-name-%42"></object>
|
||||
<map name="percent-escape-name-%42">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-percent-escape-name-B"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="area-percent-escape-id-B">
|
||||
<img src="/images/threecolors.png" usemap="#percent-escape-id-%42"/>
|
||||
<object data="/images/threecolors.png" usemap="#percent-escape-id-%42"></object>
|
||||
<map id="percent-escape-id-%42">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-percent-escape-id-B"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="area-hash-space-name">
|
||||
<img src="/images/threecolors.png" usemap="# hash-space-name"/>
|
||||
<object data="/images/threecolors.png" usemap="# hash-space-name"></object>
|
||||
<map name=" hash-space-name">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-hash-space-name"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="area-hash-space-id">
|
||||
<img src="/images/threecolors.png" usemap="# hash-space-id"/>
|
||||
<object data="/images/threecolors.png" usemap="# hash-space-id"></object>
|
||||
<map id=" hash-space-id">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-hash-space-id"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="area-space-before-hash-name">
|
||||
<img src="/images/threecolors.png" usemap=" #space-before-hash-name"/>
|
||||
<object data="/images/threecolors.png" usemap=" #space-before-hash-name"></object>
|
||||
<map name="space-before-hash-name">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-space-before-hash-name"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="area-space-before-hash-id">
|
||||
<img src="/images/threecolors.png" usemap=" #space-before-hash-id"/>
|
||||
<object data="/images/threecolors.png" usemap=" #space-before-hash-id"></object>
|
||||
<map id="space-before-hash-id">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-space-before-hash-id"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="area-garbage-before-hash-name">
|
||||
<img src="/images/threecolors.png" usemap="http://example.org/#garbage-before-hash-name"/>
|
||||
<object data="/images/threecolors.png" usemap="http://example.org/#garbage-before-hash-name"></object>
|
||||
<map name="garbage-before-hash-name">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-garbage-before-hash-name"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="area-garbage-before-hash-id">
|
||||
<img src="/images/threecolors.png" usemap="http://example.org/#garbage-before-hash-id"/>
|
||||
<object data="/images/threecolors.png" usemap="http://example.org/#garbage-before-hash-id"></object>
|
||||
<map id="garbage-before-hash-id">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-garbage-before-hash-id"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="no match">
|
||||
<img src="/images/threecolors.png" usemap="#no-such-map"/>
|
||||
<object data="/images/threecolors.png" usemap="#no-such-map"></object>
|
||||
<map>
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-no-such-map"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="no match">
|
||||
<img src="/images/threecolors.png" usemap="#different-CASE-name"/>
|
||||
<object data="/images/threecolors.png" usemap="#different-CASE-name"></object>
|
||||
<map name="different-case-name">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-different-case-name"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
<div data-expect="no match">
|
||||
<img src="/images/threecolors.png" usemap="#different-CASE-id"/>
|
||||
<object data="/images/threecolors.png" usemap="#different-CASE-id"></object>
|
||||
<map id="different-case-id">
|
||||
<area shape="rect" coords="0,0,99,50" href="#area-different-case-id"/>
|
||||
</map>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>parsing a hash-name reference for img and object</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
body { margin-top: 0 }
|
||||
iframe { height: 600px; width:50px; border-top: none }
|
||||
</style>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<iframe data-name="HTML (standards)" src="hash-name-reference-test-data.html?pipe=sub&doctype=html"></iframe>
|
||||
<iframe data-name="HTML (quirks)" src="hash-name-reference-test-data.html?pipe=sub&doctype=quirks"></iframe>
|
||||
<iframe data-name="XHTML" src="hash-name-reference-test-data.html?pipe=sub|header(Content-Type, application/xhtml%2Bxml)&doctype=html"></iframe>
|
||||
|
||||
<script>
|
||||
setup({explicit_done: true});
|
||||
|
||||
onload = function() {
|
||||
var iframes = document.querySelectorAll('iframe');
|
||||
iframes.forEach(function(iframe) {
|
||||
var iframeName = iframe.getAttribute('data-name');
|
||||
var doc = iframe.contentDocument;
|
||||
var divs = doc.querySelectorAll('div[data-expect]');
|
||||
var div, img, object;
|
||||
for (var i = 0; i < divs.length; ++i) {
|
||||
div = divs[i];
|
||||
img = div.querySelector('img');
|
||||
object = div.querySelector('object');
|
||||
[img, object].forEach(function(elm) {
|
||||
test(function(t) {
|
||||
var expected = div.getAttribute('data-expect');
|
||||
var expected_elm = expected === 'no match' ? elm : div.querySelector('area[href="#' + expected + '"]');
|
||||
var got_elm = doc.elementFromPoint(elm.offsetLeft, elm.offsetTop);
|
||||
assert_not_equals(expected_elm, null, 'sanity check (data-expect value wrong?)');
|
||||
assert_not_equals(got_elm, null, 'sanity check (too many tests to fit in viewport?)');
|
||||
assert_equals(got_elm, expected_elm);
|
||||
}, iframeName + ' ' + elm.tagName + ' usemap=' + format_value(elm.useMap));
|
||||
});
|
||||
}
|
||||
});
|
||||
done();
|
||||
};
|
||||
</script>
|
|
@ -28,6 +28,7 @@ function error_test(tagName, src) {
|
|||
assert_true(e.error instanceof MediaError);
|
||||
assert_equals(e.error.code, 4);
|
||||
assert_equals(e.error.code, e.error.MEDIA_ERR_SRC_NOT_SUPPORTED);
|
||||
assert_equals(typeof e.error.message, 'string', 'error.message type');
|
||||
t.done();
|
||||
});
|
||||
}, tagName + '.error after setting src to the empty string');
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
|
||||
|
||||
<p class="output">Actual output:</p>
|
||||
<canvas id="c" class="output" width="
|
||||
100" height="
|
||||
<canvas id="c" class="output" width="
|
||||
100" height="
|
||||
100"><p class="fallback">FAIL (fallback content)</p></canvas>
|
||||
<p class="output expectedtext">Expected output:<p><img src="size.attributes.parse.whitespace.png" class="output expected" id="expected" alt="">
|
||||
<ul id="d"></ul>
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
var t = async_test("Parsing of non-negative integers in setAttribute");
|
||||
_addTest(function(canvas, ctx) {
|
||||
|
||||
canvas.setAttribute('width', '\r\n\t\x0c100');
|
||||
canvas.setAttribute('height', '\r\n\t\x0c100');
|
||||
canvas.setAttribute('width', '\n\t\x0c100');
|
||||
canvas.setAttribute('height', '\n\t\x0c100');
|
||||
_assertSame(canvas.width, 100, "canvas.width", "100");
|
||||
_assertSame(canvas.height, 100, "canvas.height", "100");
|
||||
_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\"");
|
||||
_assertSame(canvas.getAttribute('width'), '\r\n\t\x0c100', "canvas.getAttribute('width')", "'\\r\\n\\t\\x0c100'");
|
||||
_assertSame(canvas.getAttribute('height'), '\r\n\t\x0c100', "canvas.getAttribute('height')", "'\\r\\n\\t\\x0c100'");
|
||||
_assertSame(canvas.getAttribute('width'), '\n\t\x0c100', "canvas.getAttribute('width')", "'\\n\\t\\x0c100'");
|
||||
_assertSame(canvas.getAttribute('height'), '\n\t\x0c100', "canvas.getAttribute('height')", "'\\n\\t\\x0c100'");
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -18,13 +18,16 @@
|
|||
<script>
|
||||
var t = async_test("toDataURL works before any context has been got");
|
||||
_addTest(function(canvas, ctx) {
|
||||
var no_context_data = canvas.toDataURL();
|
||||
var ctx = canvas.getContext('2d');
|
||||
ctx.rect(0, 0, 100, 50);
|
||||
ctx.fillStyle = "rgba(0, 0, 0, 0)";
|
||||
ctx.fill();
|
||||
var data = canvas.toDataURL();
|
||||
assert_equals(no_context_data, data);
|
||||
|
||||
var no_context_data = canvas.toDataURL();
|
||||
var ctx = canvas.getContext('2d');
|
||||
ctx.rect(0, 0, 100, 50);
|
||||
ctx.fillStyle = "rgba(0, 0, 0, 0)";
|
||||
ctx.fill();
|
||||
var data = canvas.toDataURL();
|
||||
assert_equals(no_context_data, data);
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 242 B |
Binary file not shown.
After Width: | Height: | Size: 268 B |
|
@ -0,0 +1,23 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Changing the img src should retain the 'complete' property</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<p id="display"><img src="image.png"></p>
|
||||
<script>
|
||||
function check() {
|
||||
var img = document.querySelector("img");
|
||||
assert_true(img.complete, "By onload, image should have loaded");
|
||||
img.src = `image.png?${Math.random()}`;
|
||||
assert_false(img.complete, "Now that we're loading we should no longer be complete");
|
||||
img.onload = function () {
|
||||
assert_true(img.complete, "The new thing should have loaded.");
|
||||
done();
|
||||
}
|
||||
}
|
||||
|
||||
onload = function () {
|
||||
check();
|
||||
};
|
||||
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue