Update web-platform-tests to revision bdb130748e35ceed09c82975e217e07bdabf0bda

This commit is contained in:
WPT Sync Bot 2019-08-06 10:25:47 +00:00
parent ff3a9180a7
commit 3a7bc18f6e
46 changed files with 723 additions and 201 deletions

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Containment Reference: Size containment replaced elements intrinsic size</title>
<style>
body > div, video, audio, img, canvas, svg, iframe {
border: 3px solid orange;
contain: size;
margin-bottom: 15px;
width: 0px;
height: 0px;
float: left;
clear: both;
}
</style>
<div>abc</div>
<video></video><br>
<video controls></video><br>
<img src="../support/60x60-green.png"><br>
<picture>
<source srcset="../support/60x60-green.png">
<img>
</picture><br>
<canvas></canvas><br>
<svg></svg><br>
<iframe></iframe>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Containment Test: Size containment replaced elements intrinsic size</title>
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-size">
<link rel="match" href="contain-size-replaced-004-ref.html">
<meta name=assert content="This test checks that intrinsic size of replaced elements with 'contain: size' is zero.">
<style>
body > div, video, audio, img, canvas, svg, iframe {
border: 3px solid orange;
contain: size;
margin-bottom: 15px;
width: min-content;
height: min-content;
float: left;
clear: both;
}
</style>
<div>abc</div>
<video></video><br>
<video controls></video><br>
<img src="../support/60x60-green.png"><br>
<picture>
<source srcset="../support/60x60-green.png">
<img>
</picture><br>
<canvas></canvas><br>
<svg></svg><br>
<iframe></iframe>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Containment Reference: Size containment replaced elements intrinsic size</title>
<style>
body > div, video, audio, img, canvas, svg, iframe {
position: absolute;
border: 3px solid orange;
contain: size;
margin-bottom: 15px;
width: 0px;
height: 0px;
float: left;
clear: both;
}
</style>
<div>abc</div>
<video></video><br>
<video controls></video><br>
<img src="../support/60x60-green.png"><br>
<picture>
<source srcset="../support/60x60-green.png">
<img>
</picture><br>
<canvas></canvas><br>
<svg></svg><br>
<iframe></iframe>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Containment Test: Size containment replaced elements intrinsic size</title>
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-size">
<link rel="match" href="contain-size-replaced-005-ref.html">
<meta name=assert content="This test checks that intrinsic size of out-of-flow replaced elements with 'contain: size' is zero.">
<style>
body > div, video, audio, img, canvas, svg, iframe {
position: absolute;
border: 3px solid orange;
contain: size;
margin-bottom: 15px;
width: min-content;
height: min-content;
float: left;
clear: both;
}
</style>
<div>abc</div>
<video></video><br>
<video controls></video><br>
<img src="../support/60x60-green.png"><br>
<picture>
<source srcset="../support/60x60-green.png">
<img>
</picture><br>
<canvas></canvas><br>
<svg></svg><br>
<iframe></iframe>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Containment Reference: Size containment replaced elements intrinsic size</title>
<style>
body > div, video, audio, img, canvas, svg, iframe {
border: 3px solid orange;
contain: size;
margin-bottom: 15px;
width: 25px;
height: 35px;
float: left;
clear: both;
}
</style>
<div>abc</div>
<video></video><br>
<video controls></video><br>
<img src="../support/60x60-green.png"><br>
<picture>
<source srcset="../support/60x60-green.png">
<img>
</picture><br>
<canvas></canvas><br>
<svg></svg><br>
<iframe></iframe>

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Containment Test: Size containment replaced elements intrinsic size</title>
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-size">
<link rel="match" href="contain-size-replaced-006-ref.html">
<meta name=assert content="This test checks that min-width/min-height of replaced elements with 'contain: size' works.">
<style>
body > div, video, audio, img, canvas, svg, iframe {
border: 3px solid orange;
contain: size;
margin-bottom: 15px;
min-width: 25px;
min-height: 35px;
width: min-content;
height: min-content;
float: left;
clear: both;
}
</style>
<div>abc</div>
<video></video><br>
<video controls></video><br>
<img src="../support/60x60-green.png"><br>
<picture>
<source srcset="../support/60x60-green.png">
<img>
</picture><br>
<canvas></canvas><br>
<svg></svg><br>
<iframe></iframe>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<title>Definite cross sizes</title>
<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#definite-sizes">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
<meta name="flags" content="" />
<meta name="assert" content="In a column flexbox, the height of a fully inflexible item with fixed flex-basis is definite, and percent children resolve against the flex basis, not the specified height." />
<style>
x-flexbox {
display: flex;
flex-direction: column;
}
x-item {
height: 0px;
flex: 0 0 100px;
}
x-item>div {
width: 100px;
height: 100%;
background: green;
}
#reference-overlapped-red {
position: absolute;
background-color: red;
width: 100px;
height: 100px;
z-index: -1;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="reference-overlapped-red"></div>
<x-flexbox>
<x-item>
<div></div>
</x-item>
</x-flexbox>

View file

@ -118,6 +118,7 @@
]);
// Exercise <track-list> (with <track-repeat>)
// https://drafts.csswg.org/css-grid/#repeat-interpolation
test_no_interpolation({
property: 'grid-template-columns',
from: "1fr repeat(2, 2fr 30px) 1fr",
@ -130,18 +131,11 @@
to: "2fr repeat(3, 3fr 40px) 2fr"
});
test_interpolation({
test_no_interpolation({
property: 'grid-template-columns',
from: "repeat(2, 2fr 30px)",
to: "repeat(4, 40px)"
}, [
{at: -1, expect: "2fr 20px 2fr 20px"},
{at: 0, expect: "repeat(2, 2fr 30px)"},
{at: 0.4, expect: "2fr 34px 2fr 34px"},
{at: 0.6, expect: "40px 36px 40px 36px"},
{at: 1, expect: "repeat(4, 40px)"},
{at: 2, expect: "40px 50px 40px 50px"}
]);
});
test_interpolation({
property: 'grid-template-columns',

View file

@ -118,6 +118,7 @@
]);
// Exercise <track-list> (with <track-repeat>)
// https://drafts.csswg.org/css-grid/#repeat-interpolation
test_no_interpolation({
property: 'grid-template-rows',
from: "1fr repeat(2, 2fr 30px) 1fr",
@ -130,18 +131,12 @@
to: "2fr repeat(3, 3fr 40px) 2fr"
});
test_interpolation({
// See https://github.com/w3c/csswg-drafts/issues/3503
test_no_interpolation({
property: 'grid-template-rows',
from: "repeat(2, 2fr 30px)",
to: "repeat(4, 40px)"
}, [
{at: -1, expect: "2fr 20px 2fr 20px"},
{at: 0, expect: "repeat(2, 2fr 30px)"},
{at: 0.4, expect: "2fr 34px 2fr 34px"},
{at: 0.6, expect: "40px 36px 40px 36px"},
{at: 1, expect: "repeat(4, 40px)"},
{at: 2, expect: "40px 50px 40px 50px"}
]);
});
test_interpolation({
property: 'grid-template-rows',

View file

@ -1,39 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Lists: test the margin collapse of marker</title>
<link rel=help href="https://www.w3.org/TR/CSS22/generate.html#lists">
<link rel="help" href="http://crbug.com/969741">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style type="text/css">
.checkbox{
-moz-appearance: checkbox;
-webkit-appearance: checkbox;
height: 0px;
}
</style>
<div id="log"></div>
<div id="target_with_marker" style="overflow:hidden; width:100px;">
<div style="margin-bottom:100px;"></div>
<div style="display:list-item; margin-left:100px; height:0px;"><div class="checkbox"></div></div>
<div style="margin-top:100px;"></div>
</div>
<div id="target_without_marker" style="overflow:hidden; width:100px;">
<div style="margin-bottom:100px;"></div>
<div style="display:list-item; margin-left:100px; list-style:none;"><div class="checkbox"></div></div>
<div style="margin-top:100px;"></div>
</div>
<script>
test(function() {
var height_with_marker = document.getElementById("target_with_marker").clientHeight;
assert_equals(height_with_marker, 200, "Should not allow margin-collapsing through if list is with marker.");
var height_without_marker = document.getElementById("target_without_marker").clientHeight;
assert_equals(height_without_marker, 100, "Should allow margin-collapsing through if list is without marker.");
}, "list and margin collapse");
</script>

View file

@ -1,23 +0,0 @@
<!DOCTYPE html>
<title>Test if it doesn't crash when resolving BFC block-offset abort</title>
<link rel=help href="https://www.w3.org/TR/CSS22/generate.html#lists">
<link rel="help" href="http://crbug.com/969741">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style type="text/css">
#checkbox{
-moz-appearance: checkbox;
-webkit-appearance: checkbox;
height: 0px;
}
</style>
<body>
<div style="float: left; width: 100px; height: 100px;"></div>
<div style="display: list-item;">
<div id="checkbox"></div>
</div>
<script>
test(() => {}, "Layout should not crash");
</script>
</body>

View file

@ -90,7 +90,7 @@ dictionary SpeechRecognitionEventInit : EventInit {
};
// The object representing a speech grammar
[Exposed=Window, Constructor]
[Exposed=Window]
interface SpeechGrammar {
attribute DOMString src;
attribute float weight;

View file

@ -128,8 +128,8 @@
}
function run_test() {
x = window.innerWidth / 2;
y = window.innerHeight / 2;
x = Math.round(window.innerWidth / 2);
y = Math.round(window.innerHeight / 2);
var actions = new test_driver.Actions();
actions.pointerMove(x, y)
.pointerDown()

View file

@ -597,7 +597,7 @@
}
},
{
"comment": "Cannot-be-a-base means no password",
"comment": "Cannot-be-a-base means no host",
"href": "data:text/plain,Stuff",
"new_value": "example.net",
"expected": {
@ -1074,7 +1074,7 @@
}
},
{
"comment": "Cannot-be-a-base means no password",
"comment": "Cannot-be-a-base means no host",
"href": "data:text/plain,Stuff",
"new_value": "example.net",
"expected": {

View file

@ -0,0 +1,93 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test convergence of setTargetAtTime</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/webaudio/resources/audit.js"></script>
<script src='/webaudio/resources/audio-param.js'></script>
</head>
<body>
<script>
let audit = Audit.createTaskRunner();
audit.define(
{task: 'setTargetAtTime', label: 'convergence handled correctly'},
(task, should) => {
// Two channels:
// 0 - actual result
// 1 - expected result
const context = new OfflineAudioContext(
{numberOfChannels: 2, sampleRate: 8000, length: 8000});
const merger = new ChannelMergerNode(
context, {numberOfChannels: context.destination.channelCount});
merger.connect(context.destination);
// Construct test source that will have tha AudioParams being tested
// to verify that the AudioParams are working correctly.
let src;
should(
() => src = new ConstantSourceNode(context),
'src = new ConstantSourceNode(context)')
.notThrow();
src.connect(merger, 0, 0);
src.offset.setValueAtTime(1, 0);
const timeConstant = 0.01;
// testTime must be at least 10*timeConstant. Also, this must not
// lie on a render boundary.
const testTime = 0.15;
const rampEnd = testTime + 0.001;
should(
() => src.offset.setTargetAtTime(0.5, 0.01, timeConstant),
`src.offset.setTargetAtTime(0.5, 0.01, ${timeConstant})`)
.notThrow();
should(
() => src.offset.setValueAtTime(0.5, testTime),
`src.offset.setValueAtTime(0.5, ${testTime})`)
.notThrow();
should(
() => src.offset.linearRampToValueAtTime(1, rampEnd),
`src.offset.linearRampToValueAtTime(1, ${rampEnd})`)
.notThrow();
// The reference node that will generate the expected output. We do
// the same automations, except we don't apply the setTarget
// automation.
const refSrc = new ConstantSourceNode(context);
refSrc.connect(merger, 0, 1);
refSrc.offset.setValueAtTime(0.5, 0);
refSrc.offset.setValueAtTime(0.5, testTime);
refSrc.offset.linearRampToValueAtTime(1, rampEnd);
src.start();
refSrc.start();
context.startRendering()
.then(audio => {
const actual = audio.getChannelData(0);
const expected = audio.getChannelData(1);
// Just verify that the actual output matches the expected
// starting a little bit before testTime.
let testFrame =
Math.floor(testTime * context.sampleRate) - 128;
should(actual.slice(testFrame), `output[${testFrame}:]`)
.beCloseToArray(
expected.slice(testFrame),
{relativeThreshold: 4.1724e-6});
})
.then(() => task.done());
});
audit.run();
</script>
</body>
</html>

View file

@ -23,8 +23,11 @@ promise_test(async t => {
assert_true(event.hostCandidate.includes(":"), "hostCandidate");
assert_true(event.url.includes("123"), "url");
});
const offerOptions = {offerToReceiveAudio: 1};
await pc.setLocalDescription(await pc.createOffer(offerOptions));
const stream = await getNoiseStream({audio:true});
t.add_cleanup(() => stream.getTracks().forEach(track => track.stop()));
pc.addTrack(stream.getAudioTracks()[0], stream);
await pc.setLocalDescription(await pc.createOffer());
await onErrorPromise;
}, 'Surfacing onicecandidateerror');