Update web-platform-tests to revision 81962ac8802223d038b188b6f9cb88a0a9c5beee

This commit is contained in:
WPT Sync Bot 2018-05-18 22:02:29 -04:00
parent fe1a057bd1
commit 24183668c4
1960 changed files with 29853 additions and 10555 deletions

View file

@ -30,8 +30,13 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/spec-example-utils.js"></script>
<script>
function checkFloats() {
approxShapeTest('test', 'line-', 2, [182, 199, 201, 199, 182, 0]);
}
</script>
</head>
<body>
<body onload="checkFloats();">
<p>
The test passes if the short green horizontal bars are the right of the circle,
the long green bar is beneath the circle, and no bars intersect the circle. There
@ -47,8 +52,5 @@
<span id="line-5">XXXXXXXXXXXXXXX</span>
</div>
<div id="log"></div>
<script>
approxShapeTest('test', 'line-', 2, [182, 199, 201, 199, 182, 0]);
</script>
</body>
</html>

View file

@ -30,8 +30,13 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/spec-example-utils.js"></script>
<script>
function checkFloats() {
approxShapeTest('test', 'line-', 2, [218, 236, 238, 236, 218, 160]);
}
</script>
</head>
<body>
<body onload="checkFloats();">
<p>
The test passes if the green horizontal bars are to the right of the circle,
and no bars intersect the circle's shadow. There should be no red.
@ -46,8 +51,5 @@
<span id="line-5">XXXXXX</span>
</div>
<div id="log"></div>
<script>
approxShapeTest('test', 'line-', 2, [218, 236, 238, 236, 218, 160]);
</script>
</body>
</html>

View file

@ -32,8 +32,13 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/spec-example-utils.js"></script>
<script>
function checkFloats() {
approxShapeTest('test', 'line-', 2, [181, 199, 201, 199, 181, 0]);
}
</script>
</head>
<body>
<body onload="checkFloats();">
<p>
The test passes if the short green horizontal bars are the right of the circle, all
intersect the shadow, none intersect the circle and the long green bar is beneath the
@ -49,8 +54,5 @@
<span id="line-5">XXXXXXXXXXXXXXX</span>
</div>
<div id="log"></div>
<script>
approxShapeTest('test', 'line-', 2, [181, 199, 201, 199, 181, 0]);
</script>
</body>
</html>

View file

@ -40,8 +40,13 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/spec-example-utils.js"></script>
<script>
function checkFloats() {
approxShapeTest('test', 'line-', 2, [200, 214, 216, 214, 200, 158, 0]);
}
</script>
</head>
<body>
<body onload="checkFloats();">
<p>
The test passes if the short green horizontal bars are the right of the circle,
the long green bar is beneath the circle, and no bars intersect the circle. There
@ -59,8 +64,5 @@
<span id="line-6">XXXXXXXXXXXXX</span>
</div>
<div id="log"></div>
<script>
approxShapeTest('test', 'line-', 2, [200, 214, 216, 214, 200, 158, 0]);
</script>
</body>
</html>

View file

@ -44,8 +44,13 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/spec-example-utils.js"></script>
<script>
function checkFloats() {
approxShapeTest('test', 'line-', 3, [182, 198, 200, 198, 182, 0]);
}
</script>
</head>
<body>
<body onload="checkFloats();">
<p>
The test passes if the short green horizontal bars are the right of the shape,
the long green bar is beneath it, and no bars intersect it. There should be no red.
@ -61,8 +66,5 @@
<span id="line-5">XXXXXXXXXXXXXXX</span>
</div>
<div id="log"></div>
<script>
approxShapeTest('test', 'line-', 3, [182, 198, 200, 198, 182, 0]);
</script>
</body>
</html>

View file

@ -32,8 +32,13 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/spec-example-utils.js"></script>
<script>
function checkFloats() {
approxShapeTest('test', 'line-', 2, [185, 199, 200, 199, 185, 0]);
}
</script>
</head>
<body>
<body onload="checkFloats();">
<p>
The test passes if the short green horizontal bars are the right of the shape,
the long green bar is beneath it, and no bars intersect it. There should be no red.
@ -48,8 +53,5 @@
<span id="line-5">XXXXXXXXXXXXXXX</span>
</div>
<div id="log"></div>
<script>
approxShapeTest('test', 'line-', 2, [185, 199, 200, 199, 185, 0]);
</script>
</body>
</html>

View file

@ -32,8 +32,13 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/spec-example-utils.js"></script>
<script>
function checkFloats() {
approxShapeTest('test', 'line-', 2, [185, 199, 200, 199, 185, 0]);
}
</script>
</head>
<body>
<body onload="checkFloats();">
<p>
The test passes if the short green horizontal bars are the right of the shape,
the long green bar is beneath it, and no bars intersect it. There should be no red.
@ -48,8 +53,5 @@
<span id="line-5">XXXXXXXXXXXXXXX</span>
</div>
<div id="log"></div>
<script>
approxShapeTest('test', 'line-', 2, [185, 199, 200, 199, 185, 0]);
</script>
</body>
</html>

View file

@ -31,8 +31,13 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/spec-example-utils.js"></script>
<script>
function checkFloats() {
approxShapeTest('test', 'line-', 2, [185, 199, 200, 199, 185, 0]);
}
</script>
</head>
<body>
<body onload="checkFloats();">
<p>
The test passes if the short green horizontal bars are the right of the shape,
the long green bar is beneath it, and no bars intersect it. There should be no red.
@ -47,8 +52,5 @@
<span id="line-5">XXXXXXXXXXXXXXX</span>
</div>
<div id="log"></div>
<script>
approxShapeTest('test', 'line-', 2, [185, 199, 200, 199, 185, 0]);
</script>
</body>
</html>

View file

@ -37,8 +37,13 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/spec-example-utils.js"></script>
<script>
function checkFloats() {
approxShapeTest('test', 'line-', 2, [48, 88, 128, 168, 180, 0]);
}
</script>
</head>
<body>
<body onload="checkFloats();">
<p>
The test passes if the longest green horizontal bar is beneath the triangle and the
rest of them are to its right and none intersect it. There should be no red.
@ -54,8 +59,5 @@
<span id="line-5">XXXXXXXXXXXX</span>
</div>
<div id="log"></div>
<script>
approxShapeTest('test', 'line-', 2, [48, 88, 128, 168, 180, 0]);
</script>
</body>
</html>

View file

@ -39,8 +39,13 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/spec-example-utils.js"></script>
<script>
function checkFloats() {
approxShapeTest('test', 'line-', 2, [242, 256, 258, 256, 242, 204, 0]);
}
</script>
</head>
<body>
<body onload="checkFloats();">
<p>
The test passes if the short green horizontal bars are the right of the black edge
of circle, the long green bar is beneath it, and no bars intersect the black.
@ -58,8 +63,5 @@
<span id="line-6">XXXXXXXXXXXXXXX</span>
</div>
<div id="log"></div>
<script>
approxShapeTest('test', 'line-', 2, [242, 256, 258, 256, 242, 204, 0]);
</script>
</body>
</html>

View file

@ -1,20 +1,11 @@
function approxShapeTest(testId, linePrefix, epsilon, lineOffsets) {
var isPositioned = { 'relative': true, 'fixed': true, 'absolute': true, 'sticky': true },
loops = 0,
testDiv = document.getElementById(testId),
testOffset = isPositioned[getComputedStyle(testDiv).position] ? 0 : testDiv.offsetLeft,
firstLine = document.getElementById(linePrefix + '0');
function runTest() {
if (firstLine.offsetLeft == testOffset) {
// wait for the shape image to load and layout to happen
if (loops > 100)
assert_unreached("Giving up waiting for shape layout to happen!");
else
loops++;
window.setTimeout(runTest, 5);
return;
}
assert_not_equals(firstLine.offsetLeft, testOffset, "Shape layout should have happened already.");
for (var i = 0; i < lineOffsets.length; i++) {
var line = document.getElementById(linePrefix + i);