Commit b0418cab authored by Chromium WPT Sync's avatar Chromium WPT Sync Committed by Commit Bot

Import wpt@e9385e019228141b8df04360ad80d39af2fa781f

Using wpt-import in Chromium 115ba705.

Build: https://ci.chromium.org/buildbot/chromium.infra.cron/wpt-importer/21195

Note to sheriffs: This CL imports external tests and adds
expectations for those tests; if this CL is large and causes
a few new failures, please fix the failures by adding new
lines to TestExpectations rather than reverting. See:
https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md

Directory owners for changes in this CL:
mlamouri@chromium.org:
  external/wpt/remote-playback
yhirano@chromium.org, mkwst@chromium.org, japhet@chromium.org:
  external/wpt/fetch

TBR=robertma

No-Export: true
Change-Id: I4a6c5ebbff768dda66cf112598def030eee37936
Reviewed-on: https://chromium-review.googlesource.com/1136223
Commit-Queue: Blink WPT Bot <blink-w3c-test-autoroller@chromium.org>
Reviewed-by: default avatarBlink WPT Bot <blink-w3c-test-autoroller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574876}
parent 7b9a34fe
......@@ -2667,6 +2667,10 @@ crbug.com/849859 external/wpt/css/css-animations/Element-getAnimations-dynamic-c
crbug.com/849859 external/wpt/web-animations/timing-model/animations/pausing-an-animation.html [ Failure ]
# ====== New tests from wpt-importer added here ======
crbug.com/626703 [ Mac ] external/wpt/svg/shapes/reftests/pathlength-002.svg [ Failure ]
crbug.com/626703 external/wpt/svg/shapes/reftests/pathlength-003.svg [ Failure ]
crbug.com/626703 external/wpt/svg/text/reftests/textpath-side-001.svg [ Failure ]
crbug.com/626703 external/wpt/svg/text/reftests/textpath-shape-001.svg [ Failure ]
crbug.com/626703 external/wpt/streams/piping/then-interception.dedicatedworker.html [ Timeout ]
crbug.com/626703 external/wpt/streams/piping/then-interception.serviceworker.https.html [ Timeout ]
crbug.com/626703 external/wpt/streams/piping/then-interception.sharedworker.html [ Timeout ]
......
<!DOCTYPE html>
<meta charset="utf-8">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/utils.js"></script>
<script>
// This controller must be on the window so it is visible to the iframe.
window.sharedController = new AbortController();
async function fetchJson(url) {
const response = await fetch(url);
assert_true(response.ok, 'response should be ok');
return response.json();
}
promise_test(async () => {
const stateKey = token();
const controller = new AbortController();
await fetch(`../resources/infinite-slow-response.py?stateKey=${stateKey}`,
{
signal: controller.signal,
keepalive: true
});
const before = await fetchJson(`../resources/stash-take.py?key=${stateKey}`);
assert_equals(before, 'open', 'connection should be open');
controller.abort();
// Spin until the abort completes.
while (true) {
const after = await fetchJson(`../resources/stash-take.py?key=${stateKey}`);
if (after) {
// stateKey='open' was removed from the dictionary by the first fetch of
// stash-take.py, so we should only ever see the value 'closed' here.
assert_equals(after, 'closed', 'connection should have closed');
break;
}
}
}, 'aborting a keepalive fetch should work');
promise_test(async t => {
const key = token();
const iframeEl = document.querySelector('iframe');
// Tell the iframe to start the fetch, and wait until it says it has.
await new Promise(resolve => {
onmessage = t.step_func(event => {
assert_equals(event.data, 'started', 'event data should be "started"');
resolve();
});
iframeEl.contentWindow.postMessage(key, '*');
});
// Detach the context of the fetch.
iframeEl.remove();
sharedController.abort();
// The abort should not do anything. The connection should stay open. Wait 1
// second to give time for the fetch to complete.
await new Promise(resolve => t.step_timeout(resolve, 1000));
const after = await fetchJson(`../resources/stash-take.py?key=${key}`);
assert_equals(after, 'on', 'fetch should have completed');
}, 'aborting a detached keepalive fetch should not do anything');
</script>
<iframe srcdoc="
<!DOCTYPE html>
<meta charset=utf-8>
<script>
onmessage = async event => {
const key = event.data;
await fetch(
`../resources/redirect.py?delay=500&amp;location=` +
`../resources/stash-put.py%3fkey=${key}%26value=on`,
{
signal: parent.sharedController.signal,
keepalive: true
});
parent.postMessage('started', '*');
};
</script>
">
</iframe>
......@@ -5,29 +5,28 @@
[Exposed=Window]
interface RemotePlayback : EventTarget {
Promise<long> watchAvailability(RemotePlaybackAvailabilityCallback callback);
Promise<void> cancelWatchAvailability(optional long id);
Promise<long> watchAvailability(RemotePlaybackAvailabilityCallback callback);
Promise<void> cancelWatchAvailability(optional long id);
readonly attribute RemotePlaybackState state;
readonly attribute RemotePlaybackState state;
attribute EventHandler onconnecting;
attribute EventHandler onconnect;
attribute EventHandler ondisconnect;
attribute EventHandler onconnecting;
attribute EventHandler onconnect;
attribute EventHandler ondisconnect;
Promise<void> prompt();
Promise<void> prompt();
};
enum RemotePlaybackState {
"connecting",
"connected",
"disconnected"
"connecting",
"connected",
"disconnected"
};
callback RemotePlaybackAvailabilityCallback = void (boolean available);
partial interface HTMLMediaElement {
[SameObject]
readonly attribute RemotePlayback remote;
[SameObject] readonly attribute RemotePlayback remote;
[CEReactions]
attribute boolean disableRemotePlayback;
[CEReactions] attribute boolean disableRemotePlayback;
};
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Remote Playback API IDL tests</title>
<link rel="help" href="https://w3c.github.io/remoteplayback/"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
</head>
<body>
<h1>Remote Playback API IDL tests</h1>
<video id='media' width=10 height=10></video>
<pre id='untested_idl' style='display:none'>
interface EventHandler {};
interface HTMLMediaElement : HTMLElement {};
interface EventTarget {};
</pre>
<script>
"use strict"
promise_test(async function() {
var idl_array = new IdlArray();
function doTest([html, idl]) {
idl_array.add_untested_idls('interface Element {};');
idl_array.add_untested_idls(html, { only: [
'HTMLElement',
'HTMLOrSVGElement',
'GlobalEventHandlers',
'DocumentAndElementEventHandlers',
'ElementContentEditable',
] });
idl_array.add_untested_idls(document.getElementById("untested_idl").textContent);
idl_array.add_idls(idl);
idl_array.add_objects({
HTMLVideoElement: [document.getElementById("media")],
RemotePlayback: [document.getElementById("media").remote]
});
idl_array.test();
}
return Promise.all(
[
"/interfaces/html.idl",
"/interfaces/remote-playback.idl",
].map(url => fetch(url).then(r => r.text())))
.then(doTest);
}, "Test driver");
</script>
<div id="log"></div>
</body>
</html>
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// META: script=/common/media.js
'use strict';
// https://w3c.github.io/remoteplayback/
idl_test(
['remote-playback'],
['html', 'dom'],
idl_array => {
try {
const media = document.createElement('video');
media.src = getVideoURI('movie_5');
media.width = media.height = 10;
document.body.appendChild(media);
self.media = media;
} catch (e) {
// Will be surfaced when media is undefined below.
}
idl_array.add_objects({
HTMLVideoElement: ['media'],
RemotePlayback: ['media.remote']
});
},
'remote-playback interfaces'
);
<svg id="svg-root"
width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:html="http://www.w3.org/1999/xhtml">
<g id="testmeta">
<title>Test of 'pathLength' on shapes.</title>
<html:link rel="author"
title="Tavmjong Bah"
href="http://tavmjong.free.fr"/>
</g>
<g id="test-reference" style="fill:none;stroke:black;stroke-width:5">
<path d="m 20,140 200,0 0,200 -200,0 z" style="stroke-dasharray:50" />
<path d="m 260,140 200,0 0,200 -200,0 z" style="stroke-dasharray:0.25" pathLength="4"/>
</g>
</svg>
<svg id="svg-root"
width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:html="http://www.w3.org/1999/xhtml">
<g id="testmeta">
<title>Test of 'pathLength' on shapes.</title>
<html:link rel="author"
title="Tavmjong Bah"
href="http://tavmjong.free.fr"/>
<html:link rel="help"
href="https://www.w3.org/TR/SVG2/shapes.html#RectElement"/>
<html:link rel="match" href="pathlength-001-ref.svg" />
</g>
<g id="test-body-content" style="fill:none;stroke:black;stroke-width:5px">
<rect x="20" y="140" width="200" height="200" style="stroke-dasharray:50"/>
<rect x="260" y="140" width="200" height="200" style="stroke-dasharray:0.25" pathLength="4"/>
</g>
</svg>
<svg id="svg-root"
width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:html="http://www.w3.org/1999/xhtml">
<g id="testmeta">
<title>Test of 'pathLength' on shapes.</title>
<html:link rel="author"
title="Tavmjong Bah"
href="http://tavmjong.free.fr"/>
</g>
<g id="test-reference" style="fill:none;stroke:black;stroke-width:5">
<path d="m 220,240 a 100,100 0 0 1 -200,0 100,100 0 0 1 200,0 z" style="stroke-dasharray:39.27" />
<path d="m 460,240 a 100,100 0 0 1 -200,0 100,100 0 0 1 200,0 z" style="stroke-dasharray:0.25" pathLength="4"/>
</g>
</svg>
<svg id="svg-root"
width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:html="http://www.w3.org/1999/xhtml">
<g id="testmeta">
<title>Test of 'pathLength' on shapes.</title>
<html:link rel="author"
title="Tavmjong Bah"
href="http://tavmjong.free.fr"/>
<html:link rel="help"
href="https://www.w3.org/TR/SVG2/shapes.html#CircleElement"/>
<html:link rel="match" href="pathlength-002-ref.svg" />
</g>
<g id="test-body-content" style="fill:none;stroke:black;stroke-width:5px">
<circle cx="120" cy="240" r="100" style="stroke-dasharray:39.27"/>
<circle cx="360" cy="240" r="100" style="stroke-dasharray:0.25" pathLength="4"/>
</g>
</svg>
<svg id="svg-root"
width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:html="http://www.w3.org/1999/xhtml">
<g id="testmeta">
<title>Test of 'pathLength' on shapes.</title>
<html:link rel="author"
title="Tavmjong Bah"
href="http://tavmjong.free.fr"/>
</g>
<style id="test-font" type="text/css">
/* Standard Font (if needed). */
@font-face {
font-family: FreeSans;
src: url("../fonts/FreeSans.woff") format("woff");
}
text {
font-family: FreeSans, sans-serif;
text-anchor: middle;
fill: black;
}
#title {
font-size: 24px;
}
.label {
font-size: 18px;
}
</style>
<g id="test-reference" style="fill:none;stroke:black;stroke-width:1px">
<path id="circle1" d="m 220,240 a 100,100 0 0 1 -200,0 100,100 0 0 1 200,0 z"/>
<path id="circle2" d="m 460,240 a 100,100 0 0 1 -200,0 100,100 0 0 1 200,0 z" pathLength="4"/>
<text><textPath xlink:href="#circle1" startOffset="471.8" style="font-size:24px;stroke:none">Some text on a circle!</textPath></text>
<text><textPath xlink:href="#circle2" startOffset="3" style="font-size:24px;stroke:none">Some text on a circle!</textPath></text>
</g>
</svg>
<svg id="svg-root"
width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:html="http://www.w3.org/1999/xhtml">
<g id="testmeta">
<title>Test of 'pathLength' on shapes.</title>
<html:link rel="author"
title="Tavmjong Bah"
href="http://tavmjong.free.fr"/>
<html:link rel="help"
href="https://www.w3.org/TR/SVG2/shapes.html#CircleElement"/>
<html:link rel="match" href="pathlength-003-ref.svg" />
</g>
<style id="test-font" type="text/css">
/* Standard Font (if needed). */
@font-face {
font-family: FreeSans;
src: url("../fonts/FreeSans.woff") format("woff");
}
text {
font-family: FreeSans, sans-serif;
text-anchor: middle;
fill: black;
}
#title {
font-size: 24px;
}
.label {
font-size: 18px;
}
</style>
<g id="test-body-content" style="fill:none;stroke:black;stroke-width:1px">
<circle id="circle1" cx="120" cy="240" r="100"/>
<circle id="circle2" cx="360" cy="240" r="100" pathLength="4"/>
<text><textPath xlink:href="#circle1" startOffset="471.8" style="font-size:24px;stroke:none">Some text on a circle!</textPath></text>
<text><textPath xlink:href="#circle2" startOffset="3" style="font-size:24px;stroke:none">Some text on a circle!</textPath></text>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<svg id="svg-root"
width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:html="http://www.w3.org/1999/xhtml">
<g id="testmeta">
<title>TextPath Shape — 001</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
</g>
<style id="test-font" type="text/css">
/* Standard Font (if needed). */
@font-face {
font-family: FreeSans;
src: url("fonts/FreeSans.woff") format("woff"),
local("FreeSans");
}
text { font-family: FreeSans, sans-serif }
</style>
<style id="test-style" type="text/css">
/* Style that is being tested (if needed). */
text { font-family: FreeSans, sans-serif }
</style>
<defs>
<path id="TextPath1" d="m 110,150
l 60, 0 a 20,20 0 0 1 20, 20
l 0, 60 a 20,20 0 0 1 -20, 20
l -60, 0 a 20,20 0 0 1 -20,-20
l 0,-60 a 20,20 0 0 1 20,-20 z"/>
<path id="TextPath2" d="m 390,200 a 50,50 0 0 1 -100,0 50,50 0 0 1 100,0 z"/>
</defs>
<g id="test-body-content" style="font-size:18px">
<use xlink:href="#TextPath1" style="fill:none;stroke:lightblue"/>
<text>
<textPath xlink:href="#TextPath1">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</textPath>
</text>
<use xlink:href="#TextPath2" style="fill:none;stroke:lightblue"/>
<text>
<textPath xlink:href="#TextPath2">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</textPath>
</text>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<svg id="svg-root"
width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:html="http://www.w3.org/1999/xhtml">
<g id="testmeta">
<title>TextPath Shape — 001</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
<html:link rel="help"
href="https://svgwg.org/svg2-draft/text.html#TextPathAttributes"/>
<html:link rel="match" href="textpath-side-001-ref.svg" />
</g>
<style id="test-font" type="text/css">
/* Standard Font (if needed). */
@font-face {
font-family: FreeSans;
src: url("fonts/FreeSans.woff") format("woff"),
local("FreeSans");
}
text { font-family: FreeSans, sans-serif }
</style>
<style id="test-style" type="text/css">
/* Style that is being tested (if needed). */
text { font-family: FreeSans, sans-serif }
</style>
<defs>
<rect id="TextPath1" x="90" y="150" width="100" height="100" rx="20"/>
<circle id="TextPath2" cx="340" cy="200" r="50"/>
</defs>
<g id="test-body-content" style="font-size:18px">
<use xlink:href="#TextPath1" style="fill:none;stroke:lightblue"/>
<text>
<textPath xlink:href="#TextPath1">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</textPath>
</text>
<use xlink:href="#TextPath2" style="fill:none;stroke:lightblue"/>
<text>
<textPath xlink:href="#TextPath2">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</textPath>
</text>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<svg id="svg-root"
width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:html="http://www.w3.org/1999/xhtml">
<g id="testmeta">
<title>TextPath Side — 001</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
</g>
<style id="test-font" type="text/css">
/* Standard Font (if needed). */
@font-face {
font-family: FreeSans;
src: url("fonts/FreeSans.woff") format("woff"),
local("FreeSans");
}
text { font-family: FreeSans, sans-serif }
</style>
<style id="test-style" type="text/css">
/* Style that is being tested (if needed). */
text { font-family: FreeSans, sans-serif }
</style>
<defs>
<path id="TextPath" d="m 90,150 c 100,-100 200,100 300,0"/>
<path id="TextPathReversed" d="m 390,150 c -100,100 -200,-100 -300,0"/>
</defs>
<g id="test-body-content" style="font-size:24px">
<g transform="translate(0,0)">
<use xlink:href="#TextPath" style="fill:none;stroke:lightblue"/>
<text>
<textPath xlink:href="#TextPath">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</textPath>
</text>
</g>
<g transform="translate(0,75)">
<use xlink:href="#TextPath" style="fill:none;stroke:lightblue"/>
<text>
<textPath xlink:href="#TextPath">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</textPath>
</text>
</g>
<g transform="translate(0,150)">
<use xlink:href="#TextPath" style="fill:none;stroke:lightblue"/>
<text>
<textPath xlink:href="#TextPathReversed">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</textPath>
</text>
</g>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<svg id="svg-root"
width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:html="http://www.w3.org/1999/xhtml">
<g id="testmeta">
<title>TextPath Side — 001</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
<html:link rel="help"
href="https://svgwg.org/svg2-draft/text.html#TextPathAttributes"/>
<html:link rel="match" href="textpath-side-001-ref.svg" />
</g>
<style id="test-font" type="text/css">
/* Standard Font (if needed). */
@font-face {
font-family: FreeSans;
src: url("fonts/FreeSans.woff") format("woff"),
local("FreeSans");
}
text { font-family: FreeSans, sans-serif }
</style>
<style id="test-style" type="text/css">
/* Style that is being tested (if needed). */
text { font-family: FreeSans, sans-serif }
</style>
<defs>
<path id="TextPath" d="m 90,150 c 100,-100 200,100 300,0"/>
</defs>
<g id="test-body-content" style="font-size:24px">
<g transform="translate(0,0)">
<use xlink:href="#TextPath" style="fill:none;stroke:lightblue"/>
<text>
<textPath xlink:href="#TextPath">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</textPath>
</text>
</g>
<g transform="translate(0,75)">
<use xlink:href="#TextPath" style="fill:none;stroke:lightblue"/>
<text>
<textPath xlink:href="#TextPath" side="left">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</textPath>
</text>
</g>
<g transform="translate(0,150)">
<use xlink:href="#TextPath" style="fill:none;stroke:lightblue"/>
<text>
<textPath xlink:href="#TextPath" side="right">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</textPath>
</text>
</g>
</g>
</svg>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment