Auto merge of #25938 - servo-wpt-sync:wpt_update_10-03-2020, r=jdm

Sync WPT with upstream (10-03-2020)

Automated downstream sync of changes from upstream as of 10-03-2020.
[no-wpt-sync]
r? @servo-wpt-sync
This commit is contained in:
bors-servo 2020-03-10 12:32:28 -04:00 committed by GitHub
commit e3c91f7c49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
140 changed files with 2007 additions and 261 deletions

View file

@ -0,0 +1,6 @@
[cssom-getBoundingClientRect-003.html]
[{Element,Range}.prototype.getBoundingClientRect on SVG <tspan>, Element]
expected: FAIL
[{Element,Range}.prototype.getBoundingClientRect on SVG <tspan>, Range]
expected: FAIL

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,4 @@
[hit-test-floats-002.html]
[Hit test float]
expected: FAIL

View file

@ -0,0 +1,4 @@
[hit-test-floats-003.html]
[Miss float below something else]
expected: FAIL

View file

@ -0,0 +1,4 @@
[hit-test-floats-005.html]
[Miss clipped float]
expected: FAIL

View file

@ -2,3 +2,6 @@
[Animations are composited by their order in the animation-name property.]
expected: FAIL
[Web-animation replaces CSS animation]
expected: FAIL

View file

@ -0,0 +1,2 @@
[conic-gradient-angle-negative.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[conic-gradient-angle.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[conic-gradient-center.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[normalization-conic-2.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[normalization-conic-degenerate.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[normalization-conic.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[out-of-range-color-stop-conic.html]
expected: FAIL

View file

@ -1,4 +0,0 @@
[CaretPosition-001.html]
[Element at (400, 100)]
expected: FAIL

View file

@ -2,6 +2,3 @@
[listeners are called when <iframe> is resized]
expected: FAIL
[listeners are called correct number of times]
expected: FAIL

View file

@ -0,0 +1,7 @@
[cssom-getBoundingClientRect-003.html]
[{Element,Range}.prototype.getBoundingClientRect on SVG <tspan>, Element]
expected: FAIL
[{Element,Range}.prototype.getBoundingClientRect on SVG <tspan>, Range]
expected: FAIL

View file

@ -21,3 +21,6 @@
[test the top of layer]
expected: FAIL
[test some point of the element: top left corner]
expected: FAIL

View file

@ -2,6 +2,3 @@
[elementsFromPoint on the root document for points in iframe elements]
expected: FAIL
[elementsFromPoint on inner documents]
expected: FAIL

View file

@ -315,9 +315,18 @@
[<iframe>: separate response Content-Type: text/html;" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: text/html */*;charset=gbk]
[<iframe>: combined response Content-Type: text/html;" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
[<iframe>: combined response Content-Type: */* text/html]
expected: FAIL
[<iframe>: separate response Content-Type: text/plain */*]
expected: FAIL
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
expected: FAIL

View file

@ -59,6 +59,3 @@
[separate text/javascript;charset=windows-1252 error text/javascript]
expected: FAIL
[separate text/javascript;charset=windows-1252 text/javascript]
expected: FAIL

View file

@ -11,6 +11,3 @@
[X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!]
expected: FAIL
[X-Content-Type-Options%3A%20'NosniFF']
expected: FAIL

View file

@ -0,0 +1,4 @@
[traverse_the_history_1.html]
[Multiple history traversals from the same task]
expected: FAIL

View file

@ -0,0 +1,4 @@
[traverse_the_history_3.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -0,0 +1,4 @@
[traverse_the_history_5.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -18,6 +18,3 @@
[Set HTTP URL frame location.protocol to ftp]
expected: FAIL
[Set data URL frame location.protocol to data]
expected: FAIL

View file

@ -0,0 +1,4 @@
[no-autofocus-on-changing-input-type.html]
[Changing input type should not refocus on the element.]
expected: FAIL

View file

@ -13,5 +13,8 @@
expected: NOTRUN
[Host element with delegatesFocus should support autofocus]
expected: NOTRUN
[Non-HTMLElement should not support autofocus]
expected: TIMEOUT

View file

@ -47,3 +47,6 @@
[X Rendered audio for channel 5 does not equal [0,0.0626220703125,0.125030517578125,0.18695068359375,0.24810791015625,0.308319091796875,0.3673095703125,0.42486572265625,0.480743408203125,0.53472900390625,0.58660888671875,0.636199951171875,0.68328857421875,0.727691650390625,0.76922607421875,0.8077392578125...\] with an element-wise tolerance of {"absoluteThreshold":0.000030517578125,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t3.6732959747314453e-1\t6.2622070312500000e-2\t3.0470752716064453e-1\t4.8658168859649127e+0\t3.0517578125000000e-5\n\t[2\]\t6.8329977989196777e-1\t1.2503051757812500e-1\t5.5826926231384277e-1\t4.4650639949963384e+0\t3.0517578125000000e-5\n\t[3\]\t9.0373212099075317e-1\t1.8695068359375000e-1\t7.1678143739700317e-1\t3.8340669508039502e+0\t3.0517578125000000e-5\n\t[4\]\t9.9780619144439697e-1\t2.4810791015625000e-1\t7.4969828128814697e-1\t3.0216621502152523e+0\t3.0517578125000000e-5\n\t[5\]\t9.5236867666244507e-1\t3.0831909179687500e-1\t6.4404958486557007e-1\t2.0889059484187866e+0\t3.0517578125000000e-5\n\t...and 44051 more errors.\n\tMax AbsError of 1.9986916780471802e+0 at index of 37840.\n\t[37840\]\t9.9994289875030518e-1\t-9.9874877929687500e-1\t1.9986916780471802e+0\t2.0011956154322119e+0\t3.0517578125000000e-5\n\tMax RelError of Infinity at index of 10584.\n\t[10584\]\t-5.8778524398803711e-1\t0.0000000000000000e+0\t5.8778524398803711e-1\tInfinity\t3.0517578125000000e-5\n]
expected: FAIL
[X Rendered audio for channel 5 does not equal [0,0.0626220703125,0.125030517578125,0.18695068359375,0.24810791015625,0.308319091796875,0.3673095703125,0.42486572265625,0.480743408203125,0.53472900390625,0.58660888671875,0.636199951171875,0.68328857421875,0.727691650390625,0.76922607421875,0.8077392578125...\] with an element-wise tolerance of {"absoluteThreshold":0.000030517578125,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t3.6732959747314453e-1\t6.2622070312500000e-2\t3.0470752716064453e-1\t4.8658168859649127e+0\t3.0517578125000000e-5\n\t[2\]\t6.8329977989196777e-1\t1.2503051757812500e-1\t5.5826926231384277e-1\t4.4650639949963384e+0\t3.0517578125000000e-5\n\t[3\]\t9.0373212099075317e-1\t1.8695068359375000e-1\t7.1678143739700317e-1\t3.8340669508039502e+0\t3.0517578125000000e-5\n\t[4\]\t9.9780619144439697e-1\t2.4810791015625000e-1\t7.4969828128814697e-1\t3.0216621502152523e+0\t3.0517578125000000e-5\n\t[5\]\t9.5236867666244507e-1\t3.0831909179687500e-1\t6.4404958486557007e-1\t2.0889059484187866e+0\t3.0517578125000000e-5\n\t...and 40513 more errors.\n\tMax AbsError of 1.9999977350234985e+0 at index of 36821.\n\t[36821\]\t9.9999773502349854e-1\t-1.0000000000000000e+0\t1.9999977350234985e+0\t1.9999977350234985e+0\t3.0517578125000000e-5\n\tMax RelError of Infinity at index of 14112.\n\t[14112\]\t-9.5105654001235962e-1\t0.0000000000000000e+0\t9.5105654001235962e-1\tInfinity\t3.0517578125000000e-5\n]
expected: FAIL

View file

@ -200,3 +200,6 @@
[X Stitched sine-wave buffers at sample rate 44100 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.000090957,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[31080\]\t-7.7842698715429952e-27\t5.6332010030746460e-1\t5.6332010030746460e-1\t1.0000000000000000e+0\t9.0957000000000003e-5\n\t[31081\]\t4.5752394860205277e-41\t6.1397600173950195e-1\t6.1397600173950195e-1\t1.0000000000000000e+0\t9.0957000000000003e-5\n\tMax AbsError of 6.1397600173950195e-1 at index of 31081.\n\tMax RelError of 1.0000000000000000e+0 at index of 31080.\n]
expected: FAIL
[X Stitched sine-wave buffers at sample rate 44100 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.000090957,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[31080\]\t1.9926784238063802e-24\t5.6332010030746460e-1\t5.6332010030746460e-1\t1.0000000000000000e+0\t9.0957000000000003e-5\n\t[31081\]\t4.5629080595344693e-41\t6.1397600173950195e-1\t6.1397600173950195e-1\t1.0000000000000000e+0\t9.0957000000000003e-5\n\tMax AbsError of 6.1397600173950195e-1 at index of 31081.\n\tMax RelError of 1.0000000000000000e+0 at index of 31080.\n]
expected: FAIL

View file

@ -1,5 +0,0 @@
[017.html]
expected: TIMEOUT
[origin of the script that invoked the method, about:blank]
expected: TIMEOUT

View file

@ -0,0 +1,7 @@
[xrWebGLLayer_opaque_framebuffer_stencil.https.html]
[Ensure that the framebuffer given by the WebGL layer works with stencil for non-immersive]
expected: FAIL
[Ensure that the framebuffer given by the WebGL layer works with stencil for immersive]
expected: FAIL

View file

@ -5,6 +5,20 @@ import glob
def main(request, response):
host_piece = request.url_parts.hostname.split(".")[0]
# Default return code for manifests if found.
return_code = 200
# Reserve 'op99' for tests that should use return code 404.
if host_piece == "op99":
return_code = 404
# Default mime type for returned data.
content_type = "application/originpolicy+json"
# Reserve 'op100' for testing incorrect mime type for manifest file.
if host_piece == "op100":
content_type = "text/plain"
filepath_pattern = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(
__file__)), "../origin-policy/policies/", "{} *.json".format(host_piece)))
@ -15,4 +29,4 @@ def main(request, response):
with open(matches[0]) as f:
data = f.read()
return 200, [('Content-Type', 'application/originpolicy+json')], data
return return_code, [('Content-Type', content_type)], data

View file

@ -5,7 +5,7 @@
#wrap {width:600px; border:1px solid;position:relative}
.a {background:lime; color:#fff; width:80%;}
.b {position:absolute; right:0; width:18%; background: cyan; color: #000; height:10em;}
textarea {width: 100%; height:10em;}
textarea {box-sizing: border-box; width: 100%; height:10em;}
</style>
<title>test</title>

View file

@ -10,7 +10,7 @@
#wrap {width:600px; border:1px solid;}
.a {background:lime; color:#fff; width:80%;}
.b {float:right; width:18%; background: cyan; color: #000; height:10em;}
textarea {width: 100%; height:10em;}
textarea {box-sizing: border-box;width: 100%; height:10em;}
</style>
</head>

View file

@ -36,4 +36,18 @@ promise_test(async t => {
// in the animation list.
assert_equals(getComputedStyle(div).marginLeft, '100px');
}, "Animations are composited by their order in the animation-name property.");
promise_test(async t => {
const div = addDiv(t);
const animA = div.animate({margin: ["100px","100px"]}, 100000);
assert_equals(getComputedStyle(div).marginLeft, '100px');
div.style.animation = 'margin50 100s';
assert_equals(getComputedStyle(div).marginLeft, '50px');
// Wait for animation starts
await waitForAnimationFrames(2);
assert_equals(getComputedStyle(div).marginLeft, '100px',
"A higher-priority animation is not overriden by a more recent"
+ "one.");
}, 'Web-animation replaces CSS animation');
</script>

View file

@ -0,0 +1,14 @@
<!doctype html>
<meta charset="utf-8">
<title>Conic gradient with negative angle parameter</title>
<link rel="help" href="https://drafts.csswg.org/css-images-4/#conic-gradients">
<meta name="assert" content="Rendering of conic-gradient with negative center parameter">
<link rel="match" href="reference/200x200-blue-black-green-red.html">
<style>
#gradient {
width: 200px;
height: 200px;
background-image: conic-gradient(from -90deg, blue 0 25%, black 25% 50%, red 50% 75%, green 75% 100%);
}
</style>
<div id="gradient"></div>

View file

@ -0,0 +1,14 @@
<!doctype html>
<meta charset="utf-8">
<title>Conic gradient with custom angle parameter</title>
<link rel="help" href="https://drafts.csswg.org/css-images-4/#conic-gradients">
<meta name="assert" content="Rendering of conic-gradient with custom center parameter">
<link rel="match" href="reference/200x200-blue-black-green-red.html">
<style>
#gradient {
width: 200px;
height: 200px;
background-image: conic-gradient(from 90deg, red 0 25%, green 25% 50%, blue 50% 75%, black 75% 100%);
}
</style>
<div id="gradient"></div>

View file

@ -0,0 +1,22 @@
<!doctype html>
<meta charset="utf-8">
<style>
#box {
width: 200px;
height: 200px;
}
#top {
border-left: 50px solid black;
border-right: 150px solid red;
height: 50px;
}
#bottom {
border-left: 50px solid blue;
border-right: 150px solid green;
height: 150px;
}
</style>
<div id="box">
<div id="top"></div>
<div id="bottom"></div>
</div>

View file

@ -0,0 +1,14 @@
<!doctype html>
<meta charset="utf-8">
<title>Conic gradient with custom center parameter</title>
<link rel="help" href="https://drafts.csswg.org/css-images-4/#conic-gradients">
<meta name="assert" content="Rendering of conic-gradient with custom center parameter">
<link rel="match" href="conic-gradient-center-ref.html">
<style>
#gradient {
width: 200px;
height: 200px;
background-image: conic-gradient(at 25% 25%, red 0 25%, green 25% 50%, blue 50% 75%, black 75% 100%);
}
</style>
<div id="gradient"></div>

View file

@ -1,23 +1,14 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Linear gradient with some inferred positions</title>
<link rel="help" href="https://drafts.csswg.org/css-images-3/#radial-color-stops">
<meta name="assert" content="Calculation of implicit gradient stops.">
<link rel="match" href="linear-gradient-ref.html">
<style>
#gradient {
width: 400px;
height: 300px;
background-image: linear-gradient(to right, black 0%, red, gold);
}
</style>
</head>
<body>
<div id="gradient"></div>
</body>
</html>
<meta charset="utf-8">
<title>Linear gradient with some inferred positions</title>
<link rel="help" href="https://drafts.csswg.org/css-images-3/#coloring-gradient-line">
<meta name="assert" content="Calculation of implicit gradient stops.">
<link rel="match" href="linear-gradient-ref.html">
<style>
#gradient {
width: 400px;
height: 300px;
background-image: linear-gradient(to right, black 0%, red, gold);
}
</style>
<div id="gradient"></div>

View file

@ -1,23 +1,14 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Linear gradient with all inferred positions</title>
<link rel="help" href="https://drafts.csswg.org/css-images-3/#radial-color-stops">
<meta name="assert" content="Calculation of implicit gradient stops.">
<link rel="match" href="linear-gradient-ref.html">
<style>
#gradient {
width: 400px;
height: 300px;
background-image: linear-gradient(to right, black, red, gold);
}
</style>
</head>
<body>
<div id="gradient"></div>
</body>
</html>
<meta charset="utf-8">
<title>Linear gradient with all inferred positions</title>
<link rel="help" href="https://drafts.csswg.org/css-images-3/#coloring-gradient-line">
<meta name="assert" content="Calculation of implicit gradient stops.">
<link rel="match" href="linear-gradient-ref.html">
<style>
#gradient {
width: 400px;
height: 300px;
background-image: linear-gradient(to right, black, red, gold);
}
</style>
<div id="gradient"></div>

View file

@ -1,19 +1,10 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
#gradient {
width: 400px;
height: 300px;
background-image: linear-gradient(to right, black 0%, red 50%, gold 100%);
}
</style>
</head>
<body>
<div id="gradient"></div>
</body>
</html>
<meta charset="utf-8">
<style>
#gradient {
width: 400px;
height: 300px;
background-image: linear-gradient(to right, black 0%, red 50%, gold 100%);
}
</style>
<div id="gradient"></div>

View file

@ -0,0 +1,3 @@
<!doctype html>
<meta charset=utf-8>
<div style="background: conic-gradient(red 0%, red 25%, blue 25%, blue 75%, green 75%, green 100%); width: 100px; height: 100px;"><br></div>

View file

@ -0,0 +1,7 @@
<!doctype html>
<meta charset=utf-8>
<title>Conic gradient with two position color stops</title>
<link rel="help" href="https://drafts.csswg.org/css-images-4/#color-stop-syntax">
<meta name="assert" content="Color stops with two positions are equivalent to two color stops with the same color">
<link rel="match" href="multiple-position-color-stop-conic-2-ref.html">
<div style="background: conic-gradient(red 0% 25%, blue 25% 75%, green 75% 100%); width: 100px; height: 100px;"><br></div>

View file

@ -1,5 +1,5 @@
<!doctype html>
<meta charset=utf-8>
<meta charset="utf-8">
<body>
<div style="background: radial-gradient(center, red 0%, red 25%, blue 25%, blue 75%, red 75%, red 100%); width: 100px; height: 100px;"><br></div>
<div style="background: radial-gradient(red 0%, red 25%, blue 25%, blue 75%, red 75%, red 100%); width: 100px; height: 100px;"><br></div>
</body>

View file

@ -1,9 +1,7 @@
<!doctype html>
<meta charset=utf-8>
<meta charset="utf-8">
<title>Radial gradient with a two position color stops</title>
<link rel="help" href="https://drafts.csswg.org/css-images-4/#color-stop-syntax">
<meta name="assert" content="Color stops with two positions are equivalent to two color stops with the same color">
<link rel=match href=/css/css-images/multiple-position-color-stop-radial-2-ref.html>
<body>
<div style="background: radial-gradient(center, red 0% 25%, blue 25% 75%, red 75% 100%); width: 100px; height: 100px;"><br></div>
</body>
<link rel="match" href=/css/css-images/multiple-position-color-stop-radial-2-ref.html>
<div style="background: radial-gradient(red 0% 25%, blue 25% 75%, red 75% 100%); width: 100px; height: 100px;"><br></div>

View file

@ -0,0 +1,14 @@
<!doctype html>
<meta charset="utf-8">
<title>Conic gradient stop normalization</title>
<link rel="help" href="https://drafts.csswg.org/css-images-4/#conic-gradients">
<meta name="assert" content="Rendering of conic-gradient with normalized color stops">
<link rel="match" href="reference/100x100-blue.html">
<style>
#gradient {
width: 100px;
height: 100px;
background-image: conic-gradient(blue 150%, red 150%);
}
</style>
<div id="gradient"></div>

View file

@ -0,0 +1,14 @@
<!doctype html>
<meta charset="utf-8">
<title>Conic gradient stop normalization</title>
<link rel="help" href="https://www.w3.org/TR/css-images-3/#repeating-gradients">
<meta name="assert" content="Rendering of repeating-conic-gradient w/ stops at the same place">
<link rel="match" href="reference/100x100-blue.html">
<style>
#gradient {
width: 100px;
height: 100px;
background-image: repeating-conic-gradient(orange 50%, blue 50%);
}
</style>
<div id="gradient"></div>

View file

@ -0,0 +1,14 @@
<!doctype html>
<meta charset="utf-8">
<title>Conic gradient stop normalization</title>
<link rel="help" href="https://drafts.csswg.org/css-images-4/#conic-gradients">
<meta name="assert" content="Rendering of conic-gradient with normalized color stops">
<link rel="match" href="reference/100x100-blue.html">
<style>
#gradient {
width: 100px;
height: 100px;
background-image: conic-gradient(green -50%, blue -50%);
}
</style>
<div id="gradient"></div>

View file

@ -0,0 +1,14 @@
<!doctype html>
<meta charset="utf-8">
<title>Linear gradient stop normalization</title>
<link rel="help" href="https://drafts.csswg.org/css-images-3/#linear-gradients">
<meta name="assert" content="Rendering of linear-gradient with normalized color stops">
<link rel="match" href="reference/100x100-blue.html">
<style>
#gradient {
width: 100px;
height: 100px;
background-image: linear-gradient(blue 150%, red 150%);
}
</style>
<div id="gradient"></div>

View file

@ -0,0 +1,14 @@
<!doctype html>
<meta charset="utf-8">
<title>Linear gradient stop normalization</title>
<link rel="help" href="https://www.w3.org/TR/css-images-3/#repeating-gradients">
<meta name="assert" content="Rendering of repeating-linear-gradient w/ stops at the same place">
<link rel="match" href="reference/100x100-blue.html">
<style>
#gradient {
width: 100px;
height: 100px;
background-image: repeating-linear-gradient(orange 50%, blue 50%);
}
</style>
<div id="gradient"></div>

View file

@ -0,0 +1,14 @@
<!doctype html>
<meta charset="utf-8">
<title>Linear gradient stop normalization</title>
<link rel="help" href="https://drafts.csswg.org/css-images-3/#linear-gradients">
<meta name="assert" content="Rendering of linear-gradient with normalized color stops">
<link rel="match" href="reference/100x100-blue.html">
<style>
#gradient {
width: 100px;
height: 100px;
background-image: linear-gradient(green -50%, blue -50%);
}
</style>
<div id="gradient"></div>

View file

@ -0,0 +1,14 @@
<!doctype html>
<meta charset="utf-8">
<title>Radial gradient stop normalization</title>
<link rel="help" href="https://drafts.csswg.org/css-images-3/#radial-gradients">
<meta name="assert" content="Rendering of radial-gradient with normalized color stops">
<link rel="match" href="reference/100x100-blue.html">
<style>
#gradient {
width: 100px;
height: 100px;
background-image: radial-gradient(blue 150%, red 150%);
}
</style>
<div id="gradient"></div>

View file

@ -0,0 +1,14 @@
<!doctype html>
<meta charset="utf-8">
<title>Radial gradient stop normalization</title>
<link rel="help" href="https://www.w3.org/TR/css-images-3/#repeating-gradients">
<meta name="assert" content="Rendering of repeating-radial-gradient w/ stops at the same place">
<link rel="match" href="reference/100x100-blue.html">
<style>
#gradient {
width: 100px;
height: 100px;
background-image: repeating-radial-gradient(orange 50%, blue 50%);
}
</style>
<div id="gradient"></div>

View file

@ -0,0 +1,14 @@
<!doctype html>
<meta charset="utf-8">
<title>Radial gradient stop normalization</title>
<link rel="help" href="https://drafts.csswg.org/css-images-3/#radial-gradients">
<meta name="assert" content="Rendering of radial-gradient with normalized color stops">
<link rel="match" href="reference/100x100-blue.html">
<style>
#gradient {
width: 100px;
height: 100px;
background-image: linear-gradient(green -50%, blue -50%);
}
</style>
<div id="gradient"></div>

View file

@ -0,0 +1,14 @@
<!doctype html>
<meta charset="utf-8">
<title>Conic gradient with out-of-range stops</title>
<link rel="help" href="https://drafts.csswg.org/css-images-4/#conic-gradients">
<meta name="assert" content="Rendering of conic-gradient with stops positioned outside of [0, 1]">
<link rel="match" href="reference/200x200-blue-black-green-red.html">
<style>
#gradient {
width: 200px;
height: 200px;
background-image: conic-gradient(orange -50% -25%, black -25% 25%, red 25% 50%, green 50% 75%, blue 75% 125%, purple 125% 150%);
}
</style>
<div id="gradient"></div>

View file

@ -0,0 +1,2 @@
<!doctype html>
<div style="width: 100px;height: 100px;background-color: blue;"></div>

View file

@ -0,0 +1,22 @@
<!doctype html>
<meta charset="utf-8">
<style>
#box {
width: 200px;
height: 200px;
}
#top {
border-left: 100px solid blue;
border-right: 100px solid black;
height: 100px;
}
#bottom {
border-left: 100px solid green;
border-right: 100px solid red;
height: 100px;
}
</style>
<div id="box">
<div id="top"></div>
<div id="bottom"></div>
</div>

View file

@ -0,0 +1,10 @@
<!doctype html>
<meta charset="utf-8">
<style>
#gradient {
width: 200px;
height: 200px;
background-image: conic-gradient(black 25%, white 0 50%, black 0 75%, white 0);
}
</style>
<div id="gradient"></div>

View file

@ -0,0 +1,14 @@
<!doctype html>
<meta charset="utf-8">
<title>Repeating conic gradient</title>
<link rel="help" href="https://drafts.csswg.org/css-images-4/#conic-gradients">
<meta name="assert" content="Rendering of repeating-conic-gradient">
<link rel="match" href="repeating-conic-gradient-ref.html">
<style>
#gradient {
width: 200px;
height: 200px;
background-image: repeating-conic-gradient(black 0 25%, white 25% 50%);
}
</style>
<div id="gradient"></div>

View file

@ -0,0 +1,29 @@
<!doctype html>
<meta charset="utf-8">
<style>
.bar {
width: 200px;
height: 40px;
}
.box {
display: inline-block;
width: 40px;
height: 40px;
background-image: conic-gradient(black 0 25%, white 0 50%, black 0 75%, white 0);
}
</style>
<div class="bar">
<div class="box"></div><div class="box"></div><div class="box"></div><div class="box"></div><div class="box"></div>
</div>
<div class="bar">
<div class="box"></div><div class="box"></div><div class="box"></div><div class="box"></div><div class="box"></div>
</div>
<div class="bar">
<div class="box"></div><div class="box"></div><div class="box"></div><div class="box"></div><div class="box"></div>
</div>
<div class="bar">
<div class="box"></div><div class="box"></div><div class="box"></div><div class="box"></div><div class="box"></div>
</div>
<div class="bar">
<div class="box"></div><div class="box"></div><div class="box"></div><div class="box"></div><div class="box"></div>
</div>

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset="utf-8">
<title>Checkerboard using conic gradients</title>
<link rel="help" href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-size">
<meta name="assert" content="Gradients are correctly repeated.">
<link rel="match" href="tiled-conic-gradients-ref.html">
<style>
#gradient {
width: 200px;
height: 200px;
background-size: 20% 20%;
background-image: conic-gradient(black 0 25%, white 0 50%, black 0 75%, white 0);
}
</style>
<div id="gradient"></div>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Lists: test the change of list-style-position</title>
<style>
div {
border: 5px solid orange;
display: list-item;
list-style-position: inside;
margin-left: 40px;
}
div > div {
list-style-type: decimal;
}
</style>
<div><div>text</div></div>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Lists: test the change of list-style-position</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="match" href="change-list-style-position-003-ref.html">
<link rel="help" href="https://www.w3.org/TR/CSS22/generate.html#lists">
<style>
div {
border: 5px solid orange;
display: list-item;
margin-left: 40px;
}
div > div {
list-style-type: decimal;
}
</style>
<div><div>text</div></div>
<script>
document.body.offsetHeight;
document.body.style.listStylePosition = "inside";
</script>

View file

@ -0,0 +1,76 @@
<!doctype html>
<title>CSS Shadow Parts - Exporting multiple shadow parts</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
<link rel="author" href="https://mozilla.org" title="Mozilla">
<link rel="help" href="https://drafts.csswg.org/css-shadow-parts/">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1618509">
<style>
::part(inner-part) {
color: red;
background: blue;
width: 100px;
height: 100px;
}
::part(inner-part-alias) {
color: green;
}
.change-1::part(inner-part) {
background: green;
}
.change-2::part(inner-part-alias) {
color: blue;
}
</style>
<div id="outer"></div>
<script>
test(function() {
let outer = document.getElementById("outer");
outer.attachShadow({ mode: "open" }).innerHTML = `
<div exportparts="inner-part, inner-part: inner-part-alias"></div>
`;
let inner = outer.shadowRoot.querySelector("div");
inner.attachShadow({ mode: "open" }).innerHTML = `
<div part="inner-part"></div>
`;
let innerPart = inner.shadowRoot.querySelector("div");
assert_equals(
getComputedStyle(innerPart).color,
"rgb(0, 128, 0)",
"color should be green from ::part(inner-part-alias) rule"
);
assert_equals(
getComputedStyle(innerPart).backgroundColor,
"rgb(0, 0, 255)",
"background should be blue from ::part(inner-part) rule"
);
outer.classList.add("change-1");
assert_equals(
getComputedStyle(innerPart).color,
"rgb(0, 128, 0)",
"color should be green from ::part(inner-part-alias) rule"
);
assert_equals(
getComputedStyle(innerPart).backgroundColor,
"rgb(0, 128, 0)",
"background should be green from .change-1::part(inner-part) rule"
);
outer.classList.add("change-2");
assert_equals(
getComputedStyle(innerPart).color,
"rgb(0, 0, 255)",
"color should be blue from .change-2::part(inner-part-alias) rule"
);
assert_equals(
getComputedStyle(innerPart).backgroundColor,
"rgb(0, 128, 0)",
"background should be green from .change-1::part(inner-part) rule"
);
}, "Forwarding part under multiple names should work");
</script>

View file

@ -0,0 +1,34 @@
<!doctype html>
<title>{Element,Range}.prototype.getBoundingClientRect on SVG &lt;tspan&gt;</title>
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-element-getboundingclientrect">
<link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-range-getboundingclientrect">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<svg>
<text y="180" font-size="100" font-family="Ahem"
fill="lightblue">X<tspan fill="blue">XX</tspan></text>
</svg>
<script>
function check(object) {
let rect = object.getBoundingClientRect();
assert_equals(rect.left, 108, 'left');
assert_equals(rect.top, 108, 'top');
assert_equals(rect.width, 200, 'width');
assert_equals(rect.height, 100, 'height');
}
async_test(t => {
window.addEventListener("load", t.step_func_done(() => {
let tspan = document.querySelector('tspan');
check(tspan);
}));
}, document.title + ', Element');
async_test(t => {
window.addEventListener("load", t.step_func_done(() => {
let tspan = document.querySelector('tspan');
let range = new Range();
range.selectNode(tspan);
check(range);
}));
}, document.title + ', Range');
</script>

View file

@ -6,6 +6,7 @@ function testRedirect(origin, redirectStatus, redirectMode, corsMode) {
var url = new URL("../resources/redirect.py", self.location);
if (origin === "cross-origin") {
url.host = get_host_info().REMOTE_HOST;
url.port = get_host_info().HTTP_PORT;
}
var urlParameters = "?redirect_status=" + redirectStatus;

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/utils.js"></script>
<body>
<input id="input1" autofocus>
<select><option>o1</option></select>
<script>
"use strict";
// WebKit had a bug that reattaching RenderObject triggered autofocus again.
// https://bugs.webkit.org/show_bug.cgi?id=68513
promise_test(async () => {
const input1 = document.querySelector('input');
const select = document.querySelector('select');
await waitUntilStableAutofocusState();
assert_equals(document.activeElement, input1);
input1.onblur = () => { input1.type = 'password'; };
select.focus();
await waitUntilStableAutofocusState();
assert_equals(document.activeElement, select);
}, 'Changing input type should not refocus on the element.');
</script>
</body>

View file

@ -213,6 +213,8 @@ This table gets populated by the script.
for (const row of testTBody.children) {
const input = row.firstChild.lastElementChild;
// FIXME: This test makes assumptions about default form control styling
// that don't hold in all platforms.
const allowedDelta = 3;
// This is not using test() because promise_setup() only allows promise_test().
promise_test(async () => {

View file

@ -1,8 +1,8 @@
// https://github.com/wicg/trusted-types
typedef (DOMString or TrustedHTML) HTMLString;
typedef (DOMString or TrustedScript) ScriptString;
typedef (DOMString or TrustedScriptURL) ScriptURLString;
typedef [StringContext=TrustedHTML] DOMString HTMLString;
typedef [StringContext=TrustedScript] DOMString ScriptString;
typedef [StringContext=TrustedScriptURL] USVString ScriptURLString;
[
Exposed=(Window, Worker),
@ -40,7 +40,7 @@ typedef (DOMString or TrustedScriptURL) ScriptURLString;
readonly attribute DOMString name;
TrustedHTML createHTML(DOMString input);
TrustedScript createScript(DOMString input);
TrustedScriptURL createScriptURL(DOMString input);
TrustedScriptURL createScriptURL(USVString input);
};
dictionary TrustedTypePolicyOptions {

View file

@ -0,0 +1,10 @@
<!doctype html>
<meta charset=utf-8>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="resources/test-helpers.js"></script>
<script src="resources/native-fs-test-helpers.js"></script>
<script src="script-tests/FileSystemBaseHandle-isSameEntry.js"></script>

View file

@ -0,0 +1,10 @@
<!doctype html>
<meta charset=utf-8>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="resources/test-helpers.js"></script>
<script src="resources/native-fs-test-helpers.js"></script>
<script src="script-tests/FileSystemDirectoryHandle-resolve.js"></script>

View file

@ -0,0 +1,3 @@
// META: script=resources/test-helpers.js
// META: script=resources/sandboxed-fs-test-helpers.js
// META: script=script-tests/FileSystemBaseHandle-isSameEntry.js

View file

@ -0,0 +1,3 @@
// META: script=resources/test-helpers.js
// META: script=resources/sandboxed-fs-test-helpers.js
// META: script=script-tests/FileSystemDirectoryHandle-resolve.js

View file

@ -0,0 +1,62 @@
'use strict';
directory_test(async (t, root_dir) => {
assert_true(await root_dir.isSameEntry(root_dir));
const subdir = await createDirectory(t, 'subdir-name', root_dir);
assert_true(await subdir.isSameEntry(subdir));
}, 'isSameEntry for identical directory handles returns true');
directory_test(async (t, root_dir) => {
const subdir = await createDirectory(t, 'subdir-name', root_dir);
assert_false(await root_dir.isSameEntry(subdir));
assert_false(await subdir.isSameEntry(root_dir));
}, 'isSameEntry for different directories returns false');
directory_test(async (t, root_dir) => {
const subdir = await createDirectory(t, 'subdir-name', root_dir);
const subdir2 = await root_dir.getDirectory('subdir-name');
assert_true(await subdir.isSameEntry(subdir2));
assert_true(await subdir2.isSameEntry(subdir));
}, 'isSameEntry for different handles for the same directory');
directory_test(async (t, root_dir) => {
const handle = await createEmptyFile(t, 'mtime.txt', root_dir);
assert_true(await handle.isSameEntry(handle));
}, 'isSameEntry for identical file handles returns true');
directory_test(async (t, root_dir) => {
const handle1 = await createEmptyFile(t, 'mtime.txt', root_dir);
const handle2 = await createEmptyFile(t, 'foo.txt', root_dir);
assert_false(await handle1.isSameEntry(handle2));
assert_false(await handle2.isSameEntry(handle1));
}, 'isSameEntry for different files returns false');
directory_test(async (t, root_dir) => {
const handle1 = await createEmptyFile(t, 'mtime.txt', root_dir);
const handle2 = await root_dir.getFile('mtime.txt');
assert_true(await handle1.isSameEntry(handle2));
assert_true(await handle2.isSameEntry(handle1));
}, 'isSameEntry for different handles for the same file');
directory_test(async (t, root_dir) => {
const handle1 = await createEmptyFile(t, 'mtime.txt', root_dir);
const subdir = await createDirectory(t, 'subdir-name', root_dir);
const handle2 = await createEmptyFile(t, 'mtime.txt', subdir);
assert_false(await handle1.isSameEntry(handle2));
assert_false(await handle2.isSameEntry(handle1));
}, 'isSameEntry comparing a file to a file in a different directory returns false');
directory_test(async (t, root_dir) => {
const handle1 = await createEmptyFile(t, 'mtime.txt', root_dir);
const handle2 = await createDirectory(t, 'subdir-name', root_dir);
assert_false(await handle1.isSameEntry(handle2));
assert_false(await handle2.isSameEntry(handle1));
}, 'isSameEntry comparing a file to a directory returns false');

View file

@ -0,0 +1,27 @@
'use strict';
directory_test(async (t, root_dir) => {
assert_array_equals(await root_dir.resolve(root_dir), []);
}, 'Resolve returns empty array for same directory');
directory_test(async (t, root_dir) => {
const subdir = await createDirectory(t, 'subdir-name', root_dir);
const file = await createEmptyFile(t, 'file-name', subdir);
assert_array_equals(await root_dir.resolve(file), ['subdir-name', 'file-name']);
}, 'Resolve returns correct path');
directory_test(async (t, root_dir) => {
const subdir = await createDirectory(t, 'subdir😊', root_dir);
const file = await createEmptyFile(t, 'file-name', subdir);
assert_array_equals(await root_dir.resolve(file), ['subdir😊', 'file-name']);
assert_array_equals(await root_dir.resolve(subdir), ['subdir😊']);
}, 'Resolve returns correct path with non-ascii characters');
directory_test(async (t, root_dir) => {
const subdir = await createDirectory(t, 'subdir-name', root_dir);
const file = await createEmptyFile(t, 'file-name', root_dir);
assert_equals(await subdir.resolve(file), null);
}, 'Resolve returns null when entry is not a child');

View file

@ -0,0 +1,17 @@
<!DOCTYPE HTML>
<meta charset="utf-8">
<title>Missing manifest file.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../resources/origin-policy-test-runner.js"></script>
<div id="log"></div>
<script>
"use strict";
<!-- Manifests delivered with 404 status code must be ignored. -->
runTestsInSubframe({
hostname: "op99",
testJS: "resources/allow-unsafe-eval.mjs"
});
</script>

View file

@ -0,0 +1,16 @@
<!DOCTYPE HTML>
<meta charset="utf-8">
<title>Valid "content_security/policies" member must be ignored</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../resources/origin-policy-test-runner.js"></script>
<div id="log"></div>
<script>
"use strict";
runTestsInSubframe({
hostname: "op100",
testJS: "resources/allow-unsafe-eval.mjs"
});
</script>

View file

@ -0,0 +1,6 @@
{
"ids" : ["csp-valid-but-served-with-invalid-mimetype"],
"content_security" : {
"policies" : ["script-src 'self' 'unsafe-inline'"]
}
}

View file

@ -0,0 +1,6 @@
{
"ids" : ["csp-valid-but-served-as-404"],
"content_security" : {
"policies" : ["script-src 'self' 'unsafe-inline'"]
}
}

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/utils.js"></script>
<form>
<input type="text" id='myInput'>
</form>
<script>
promise_test(async () => {
const onload = new Promise(r => window.addEventListener('load', r));
await onload;
return assertNoFirstContentfulPaint().then(() => {
document.getElementById('myInput').value = 'default text';
return assertFirstContentfulPaint();
})
});
</script>
</body>

View file

@ -0,0 +1,53 @@
// We use requestAnimationFrame() calls to force the user agent to paint. Hence, set
// |numFramesWaiting| to 3 and use that constant whenever the test needs to wait for
// the next paint to occur.
const numFramesWaiting = 3;
function waitForAnimationFrames(count) {
return new Promise(resolve => {
if (count-- <= 0) {
resolve();
} else {
requestAnimationFrame(() => {
waitForAnimationFrames(count).then(resolve);
});
}
});
}
function assertNoFirstContentfulPaint() {
return waitForAnimationFrames(numFramesWaiting).then(() => {
return new Promise((resolve, reject) => {
const observer = new PerformanceObserver(entryList =>{
const entries = entryList.getEntriesByName('first-contentful-paint');
observer.disconnect();
if (entries.length > 0)
reject('Received a first contentful paint entry.');
else
resolve();
});
observer.observe({type: 'paint', buffered: true});
observer.observe({type: 'mark'});
performance.mark('flush');
});
});
}
function assertFirstContentfulPaint() {
return waitForAnimationFrames(numFramesWaiting).then(() => {
return new Promise((resolve, reject) => {
const observer = new PerformanceObserver(entryList =>{
const entries = entryList.getEntriesByName('first-contentful-paint');
observer.disconnect();
if (entries.length === 0)
reject('Did not receive a first contentful paint entry.');
else {
resolve();
}
});
observer.observe({type: 'paint', buffered: true});
observer.observe({type: 'mark'});
performance.mark('flush');
});
});
}

View file

@ -398,15 +398,12 @@ var WebNFCTest = (() => {
Object.freeze(this); // Makes it immutable.
}
initialize() {
async initialize() {
if (testInternal.initialized)
throw new Error('Call reset() before initialize().');
if (window.testRunner) {
// Grant nfc permissions for Chromium testrunner.
window.testRunner.setPermission('nfc', 'granted',
location.origin, location.origin);
}
// Grant nfc permissions for Chromium testdriver.
await test_driver.set_permission({ name: 'nfc' }, 'granted', false);
if (testInternal.mockNFC == null) {
testInternal.mockNFC = new MockNFC();

View file

@ -106,7 +106,9 @@ function navigate_test(override_parameters) {
script_url += '?' + parameters.wait_state;
navigator.serviceWorker.addEventListener('message', function(event) {
pausedLifecyclePort = event.data.port;
if (event.data.port) {
pausedLifecyclePort = event.data.port;
}
});
}

View file

@ -0,0 +1,129 @@
<!doctype html>
<title>SVGGraphicsElement.prototype.getBBox</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="testcontainer">
<svg width="1" height="1" visibility="hidden">
<g id="g1">
<polygon id="p1" fill="none" stroke="red"/>
<rect id="r1" x="50" y="50" width="50" height="50" fill="green"/>
</g>
<g id="g2">
<rect id="r2" x="50" y="50" width="50" height="50" fill="green"/>
<rect id="r3" x="20" y="20" width="20" height="0" fill="red"/>
<rect id="r4" x="120" y="20" width="20" height="20" fill="blue" style="display:none"/>
<ellipse id="c1" cx="20" cy="120" rx="0" ry="20" fill="black"/>
<g>
<rect id="r5" x="120" y="120" width="-1" height="100" fill="cyan"/>
</g>
</g>
<g id="g3">
<path id="p2" fill="none" stroke="red"/>
<rect id="r6" x="50" y="50" width="50" height="50" fill="green"/>
<!-- The following path should be included in the bbox. -->
<path d=""/>
</g>
<g id="g4">
<polyline id="p3" fill="none" stroke="red"/>
<rect id="r7" x="50" y="50" width="50" height="50" fill="green"/>
</g>
<g id="g5">
<path id="p4" d="M3"/>
<rect id="r8" x="50" y="50" width="50" height="50" fill="green"/>
</g>
<g id="g6">
<polygon id="p5" points="47" fill="none" stroke="red"/>
<rect id="r9" x="50" y="50" width="50" height="50" fill="green"/>
</g>
<g id="g7">
<polyline id="p6" points="47" fill="none" stroke="red"/>
<rect id="r10" x="50" y="50" width="50" height="50" fill="green"/>
</g>
<g id="g8">
<path id="p7" d="M40 20h0" fill="none" stroke="red"/>
<rect id="r11" x="50" y="50" width="50" height="50" fill="green"/>
</g>
<g id="g9">
<rect width="1" height="1"/>
<path d="M 0.5 0.5 0.5 0 A 0.5 0.5 0 0 1 0.9296658068966942 0.7557093943988227 z"/>
</g>
<g id="g10">
<rect id="r12" x="5" y="5" width="10" height="10"/>
<foreignObject/>
</g>
<g id="g11">
<rect id="r13" x="5" y="5" width="10" height="10"/>
<image/>
</g>
</svg>
</div>
<div id=log></div>
<script>
const EPSILON = Math.pow(2, -24); // float epsilon
function assert_rect_approx_equals(rect, expected, epsilon) {
assert_approx_equals(rect.x, expected.x, epsilon, "x");
assert_approx_equals(rect.y, expected.y, epsilon, "y");
assert_approx_equals(rect.width, expected.width, epsilon, "width");
assert_approx_equals(rect.height, expected.height, epsilon, "height");
}
test(function() {
assert_rect_approx_equals(document.getElementById("p1").getBBox(), {"x":0, "y":0, "width":0, "height":0 }, EPSILON);
}, "getBBox on polygon with no points attribute");
test(function() {
assert_rect_approx_equals(document.getElementById("p3").getBBox(), {"x":0, "y":0, "width":0, "height":0}, EPSILON);
}, "getBBox on polyline with no points attribute");
test(function() {
assert_rect_approx_equals(document.getElementById("p2").getBBox(), {"x":0, "y":0, "width":0, "height":0 }, EPSILON);
}, "getBBox on path with no d attribute");
test(function() {
assert_rect_approx_equals(document.getElementById("p4").getBBox(), {"x":0, "y":0, "width":0, "height":0 }, EPSILON);
}, "getBBox on path with no valid path segments in d attribute");
test(function() {
assert_rect_approx_equals(document.getElementById("p5").getBBox(), {"x":0, "y":0, "width":0, "height":0 }, EPSILON);
}, "getBBox on polygon with no valid point in the points attribute");
test(function() {
assert_rect_approx_equals(document.getElementById("p6").getBBox(), {"x":0, "y":0, "width":0, "height":0 }, EPSILON);
}, "getBBox on polyline with no valid point in the points attribute");
test(function() {
assert_rect_approx_equals(document.getElementById("g1").getBBox(), document.getElementById("r1").getBBox(), EPSILON);
}, "polygon doesn't contribute to parent bbox");
test(function() {
assert_rect_approx_equals(document.getElementById("g1").getBBox(), document.getElementById("r2").getBBox(), EPSILON);
}, "group with hidden child");
test(function() {
assert_rect_approx_equals(document.getElementById("g3").getBBox(), document.getElementById("r6").getBBox(), EPSILON);
}, "path doesn't contribute to parent bbox");
test(function() {
assert_rect_approx_equals(document.getElementById("g5").getBBox(), document.getElementById("r8").getBBox(), EPSILON);
}, "path with only invalid segments doesn't contribute to parent bbox");
test(function() {
assert_rect_approx_equals(document.getElementById("g4").getBBox(), document.getElementById("r7").getBBox(), EPSILON);
}, "polyline doesn't contribute to parent bbox");
test(function() {
assert_rect_approx_equals(document.getElementById("g6").getBBox(), document.getElementById("r9").getBBox(), EPSILON);
}, "polygon with no valid points doesn't contribute to parent bbox");
test(function() {
assert_rect_approx_equals(document.getElementById("g7").getBBox(), document.getElementById("r10").getBBox(), EPSILON);
}, "polyline with no valid points doesn't contribute to parent bbox");
test(function() {
assert_rect_approx_equals(document.getElementById("p7").getBBox(), {"x":40, "y":20, "width":0, "height":0 }, EPSILON);
}, "getBBox on path with no height");
test(function() {
assert_rect_approx_equals(document.getElementById("g8").getBBox(), {"x":40, "y":20, "width":60, "height":80 }, EPSILON);
}, "path with no height should contribute to parent bbox");
test(function() {
assert_rect_approx_equals(document.getElementById("g9").getBBox(), {"x":0, "y":0, "width":1, "height":1 }, EPSILON);
}, "arc bbox should be tight");
test(function() {
let g10 = document.getElementById("g10");
let r12 = document.getElementById("r12");
assert_rect_approx_equals(g10.getBBox(), r12.getBBox(), EPSILON);
}, "empty foreignObject does not contribute to parent bbox");
test(function() {
let g11 = document.getElementById("g11");
let r13 = document.getElementById("r13");
assert_rect_approx_equals(g11.getBBox(), r13.getBBox(), EPSILON);
}, "empty image does not contribute to parent bbox");
</script>

View file

@ -0,0 +1,19 @@
<!doctype html>
<title>SVGGraphicsElement.prototype.getBBox on &lt;tspan&gt;</title>
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<svg height="100">
<text y="180" font-size="100" font-family="Ahem" fill="lightblue"
transform="translate(0, -100)">X<tspan fill="blue">X</tspan></text>
</svg>
<script>
async_test(t => {
onload = t.step_func_done(() => {
let tspan = document.querySelector('tspan');
let bbox = tspan.getBBox();
for (let property of ['x', 'y', 'width', 'height'])
assert_equals(bbox[property], 100, property);
});
});
</script>

View file

@ -17,6 +17,7 @@ Each TestNode has zero or more SubtestNode children, one for each
known subtest of the test.
"""
def data_cls_getter(output_node, visited_node):
# visited_node is intentionally unused
if output_node is None:
@ -55,6 +56,16 @@ def list_prop(name, node):
return []
def str_prop(name, node):
try:
prop = node.get(name)
if not isinstance(prop, string_types):
raise ValueError
return prop
except KeyError:
return None
def tags(node):
"""Set of tags that have been applied to the test"""
try:
@ -309,6 +320,10 @@ class ExpectedManifest(ManifestItem):
def known_intermittent(self):
return list_prop("expected", self)[1:]
@property
def implementation_status(self):
return str_prop("implementation-status", self)
class DirectoryManifest(ManifestItem):
@property
@ -359,6 +374,10 @@ class DirectoryManifest(ManifestItem):
def fuzzy(self):
return fuzzy_prop(self)
@property
def implementation_status(self):
return str_prop("implementation-status", self)
class TestNode(ManifestItem):
def __init__(self, node, **kwargs):
@ -444,6 +463,10 @@ class TestNode(ManifestItem):
def known_intermittent(self):
return list_prop("expected", self)[1:]
@property
def implementation_status(self):
return str_prop("implementation-status", self)
def append(self, node):
"""Add a subtest to the current test

View file

@ -17,6 +17,7 @@ manifest = None
manifest_update = None
download_from_github = None
def do_delayed_imports():
# This relies on an already loaded module having set the sys.path correctly :(
global manifest, manifest_update, download_from_github
@ -168,6 +169,7 @@ class TestLoader(object):
chunk_number=1,
include_https=True,
skip_timeout=False,
skip_implementation_status=None,
chunker_kwargs=None):
self.test_types = test_types
@ -180,6 +182,7 @@ class TestLoader(object):
self.disabled_tests = None
self.include_https = include_https
self.skip_timeout = skip_timeout
self.skip_implementation_status = skip_implementation_status
self.chunk_type = chunk_type
self.total_chunks = total_chunks
@ -266,6 +269,8 @@ class TestLoader(object):
enabled = False
if self.skip_timeout and test.expected() == "TIMEOUT":
enabled = False
if self.skip_implementation_status and test.implementation_status() in self.skip_implementation_status:
enabled = False
key = "enabled" if enabled else "disabled"
tests[key][test_type].append(test)

View file

@ -137,6 +137,10 @@ scheme host and port.""")
help="Path to manifest listing tests to include")
test_selection_group.add_argument("--skip-timeout", action="store_true",
help="Skip tests that are expected to time out")
test_selection_group.add_argument("--skip-implementation-status",
action="append",
choices=["not-implementing", "backlog", "implementing"],
help="Skip tests that have the given implementation status")
test_selection_group.add_argument("--tag", action="append", dest="tags",
help="Labels applied to tests to include in the run. "
"Labels starting dir: are equivalent to top-level directories.")

View file

@ -79,6 +79,7 @@ def get_loader(test_paths, product, debug=None, run_info_extras=None, chunker_kw
chunk_number=kwargs["this_chunk"],
include_https=ssl_enabled,
skip_timeout=kwargs["skip_timeout"],
skip_implementation_status=kwargs["skip_implementation_status"],
chunker_kwargs=chunker_kwargs)
return run_info, test_loader

View file

@ -342,6 +342,13 @@ class Test(object):
except KeyError:
return default
def implementation_status(self):
implementation_status = None
for meta in self.itermeta():
implementation_status = meta.implementation_status
if implementation_status:
return implementation_status
def known_intermittent(self, subtest=None):
metadata = self._get_metadata(subtest)
if metadata is None:

View file

@ -17,7 +17,6 @@ test(t => {
probe.innerHTML = "probe";
const doc = new DOMParser().parseFromString(`
<meta http-equiv="Content-Security-Policy" content="trusted-types *">
<body><div id="probe"></div></body>"`, "text/html");
probe.innerHTML = "probe";

View file

@ -2,19 +2,46 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script'">
<body>
<script>
async_test(t => {
window.timeoutTest = t;
window.timeoutTrustedTest = t;
let policy = createScript_policy(window, 'timeout');
let script = policy.createScript("window.timeoutTest.done();");
let script = policy.createScript("window.timeoutTrustedTest.done();");
setTimeout(script);
}, "window.setTimeout assigned via policy (successful Script transformation).");
async_test(t => {
window.intervalTest = t;
window.intervalTrustedTest = t;
let policy = createScript_policy(window, 'script');
let script = policy.createScript("window.intervalTest.done();");
let script = policy.createScript("window.intervalTrustedTest.done();");
setInterval(script);
}, "window.setInterval assigned via policy (successful Script transformation).");
trustedTypes.createPolicy("default", {createScript: s => "window." + s + ".done()"});
async_test(t => {
window.timeoutStringTest = t;
let script = "timeoutStringTest";
setTimeout(script);
}, "window.setTimeout assigned via default policy (successful Script transformation).");
async_test(t => {
window.intervalStringTest = t;
let script = "intervalStringTest";
setInterval(script);
}, "window.setInterval assigned via default policy (successful Script transformation).");
async_test(t => {
window.timeoutFunctionTest = t;
let script = () => window.timeoutFunctionTest.done();
setTimeout(script);
}, "window.setTimeout assigned with a function handler shouldn't go through default policy.");
async_test(t => {
window.intervalFunctionTest = t;
let script = () => window.intervalFunctionTest.done();
setInterval(script);
}, "window.setInterval assigned with a function handler shouldn't go through default policy.");
</script>

View file

@ -3,7 +3,7 @@
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *; require-trusted-types-for 'script'">
<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script'">
<body>
<div id="container"></div>
<script>

View file

@ -3,8 +3,7 @@
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<meta http-equiv="Content-Security-Policy"
content="trusted-types *; require-trusted-types-for 'script'">
<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script'">
</head>
<body>
<script>

View file

@ -2,7 +2,6 @@
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *">
</head>
<body>
<script>

View file

@ -3,7 +3,6 @@
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *">
<body>
<script>
test(t => {

View file

@ -3,7 +3,6 @@
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *">
<body>
<script>
test(t => {

View file

@ -3,7 +3,6 @@
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *">
<body>
<script>
test(t => {

View file

@ -2,7 +2,6 @@
<script src="/resources/testharness.js" ></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *">
<body>
<script>
//No name given test

Some files were not shown because too many files have changed in this diff Show more