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

Import wpt@677d31b5fbbcfe9d3f7628a9b73c4a6066bbe76d

Using wpt-import in Chromium db82c1cf.
With Chromium commits locally applied on WPT:
9e3affdd "Ship `referer` header length limitation."
723f9a78 "Prevent leaking Sec-CH-/Sec-Fetch- Request Headers on HTTPS Downgrade Redirects."


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:
atotic@chromium.org:
  external/wpt/css/CSS2/abspos
chcunningham@chromium.org, wolenetz@chromium.org:
  external/wpt/media-source

NOAUTOREVERT=true
TBR=foolip

No-Export: true
Change-Id: I229152a38214541c11e387a718a4ec67e05df260
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1655027Reviewed-by: default avatarWPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: WPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#668395}
parent a984c006
......@@ -2838,6 +2838,7 @@ crbug.com/968164 external/wpt/css/css-ui/webkit-appearance-menulist-button-001.h
crbug.com/968164 external/wpt/css/css-ui/webkit-appearance-menulist-button-002.html [ Failure ]
# ====== New tests from wpt-importer added here ======
crbug.com/626703 external/wpt/css/CSS2/abspos/hypothetical-box-dynamic.html [ Failure ]
crbug.com/626703 external/wpt/css/css-sizing/clone-nowrap-intrinsic-size-bidi.html [ Failure ]
crbug.com/626703 external/wpt/service-workers/service-worker/ready.https.html [ Timeout ]
crbug.com/626703 virtual/blink-cors/external/wpt/service-workers/service-worker/ready.https.html [ Timeout ]
......
<!doctype html>
<title>CSS Test Reference</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<style>
div {
font: 16px / 1 monospace;
text-align: center;
margin: 5px;
position: relative;
min-height: 30px;
}
span {
position: absolute;
}
</style>
<p>Should see two words at the same horizontal position below:</p>
<div>
<span>Foo</span>
</div>
<div>
<span>Foo</span>
</div>
<!doctype html>
<html class="reftest-wait">
<title>Layout is correctly updated when the hypothetical display of an element changes, even though the final computed display doesn't</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements">
<link rel="match" href="hypothetical-box-dynamic-ref.html">
<style>
div {
font: 16px / 1 monospace;
text-align: center;
margin: 5px;
position: relative;
min-height: 30px;
}
span {
position: absolute;
}
.block {
display: block;
}
</style>
<p>Should see two words at the same horizontal position below:</p>
<div>
<span class="block">Foo</span>
</div>
<div>
<span>Foo</span>
</div>
<script>
onload = function() {
requestAnimationFrame(() => requestAnimationFrame(() => {
document.querySelector(".block").className = "";
document.documentElement.className = "";
}));
}
</script>
......@@ -670,6 +670,8 @@ CSS-COLLIDING-REF-NAME: css/vendor-imports/mozilla/mozilla-central-reftests/cont
CSS-COLLIDING-SUPPORT-NAME: css/css-backgrounds/support/red.png
CSS-COLLIDING-REF-NAME: css/css-contain/reference/contain-size-fieldset-001-ref.html
CSS-COLLIDING-REF-NAME: css/vendor-imports/mozilla/mozilla-central-reftests/contain/contain-size-fieldset-001-ref.html
CSS-COLLIDING-REF-NAME: css/css-contain/reference/contain-size-fieldset-002-ref.html
CSS-COLLIDING-REF-NAME: css/vendor-imports/mozilla/mozilla-central-reftests/contain/contain-size-fieldset-002-ref.html
CSS-COLLIDING-SUPPORT-NAME: css/compositing/mix-blend-mode/support/red.png
CSS-COLLIDING-SUPPORT-NAME: css/compositing/background-blending/support/red.png
CSS-COLLIDING-SUPPORT-NAME: css/CSS2/normal-flow/support/replaced-min-max-3.png
......
......@@ -33,11 +33,6 @@
});
}, 'MediaSource.endOfStream(): media element notified that it now has all of the media data');
function threeDecimalPlaces(number)
{
return Number(number.toFixed(3));
}
mediasource_testafterdataloaded(function(test, mediaElement, mediaSource, segmentInfo, sourceBuffer, mediaData)
{
sourceBuffer.appendBuffer(mediaData);
......@@ -52,7 +47,7 @@
// Note that segmentInfo.duration is expected to also be the
// highest track buffer range end time. Therefore, endOfStream() should
// not change duration with this media.
assert_equals(threeDecimalPlaces(segmentInfo.duration), threeDecimalPlaces(mediaSource.duration),
assert_approx_equals(segmentInfo.duration, mediaSource.duration, 0.001,
'SegmentInfo duration should initially roughly match mediaSource duration');
assert_less_than_equal(highestEndTime, mediaSource.duration,
'Media duration may be slightly longer than intersected track buffered ranges');
......@@ -65,7 +60,7 @@
assert_equals(sourceBuffer.buffered.length, 1,
'Media data properly buffered after endOfStream');
assert_equals(threeDecimalPlaces(segmentInfo.duration), threeDecimalPlaces(mediaSource.duration),
assert_approx_equals(segmentInfo.duration, mediaSource.duration, 0.001,
'SegmentInfo duration should still roughly match mediaSource duration');
assert_less_than_equal(highestEndTime, mediaSource.duration,
'Media duration may be slightly longer than intersected track buffered ranges');
......
......@@ -42,11 +42,6 @@
test.waitForExpectedEvents(callback);
}
function threeDecimalPlaces(number)
{
return Number(number.toFixed(3));
}
// Verifies expected times to 3 decimal places before and after mediaSource.endOfStream(),
// and calls |callback| on success.
function verify_offset_and_buffered(test, mediaSource, sourceBuffer,
......@@ -54,19 +49,21 @@
expectedBufferedRangeMaxEndTimeBeforeEOS,
expectedBufferedRangeEndTimeAfterEOS,
callback) {
assert_equals(threeDecimalPlaces(sourceBuffer.timestampOffset),
threeDecimalPlaces(expectedTimestampOffset),
"expectedTimestampOffset");
assert_approx_equals(sourceBuffer.timestampOffset,
expectedTimestampOffset,
0.001,
"expectedTimestampOffset");
// Prior to EOS, the buffered range end time may not have fully reached the next media
// segment's timecode (adjusted by any timestampOffset). It should not exceed it though.
// Therefore, an exact assertBufferedEquals() will not work here.
assert_greater_than(sourceBuffer.buffered.length, 0, "sourceBuffer.buffered has at least 1 range before EOS");
assert_equals(threeDecimalPlaces(sourceBuffer.buffered.start(0)),
threeDecimalPlaces(expectedBufferedRangeStartTime),
"sourceBuffer.buffered range begins where expected before EOS");
assert_less_than_equal(threeDecimalPlaces(sourceBuffer.buffered.end(0)),
threeDecimalPlaces(expectedBufferedRangeMaxEndTimeBeforeEOS),
assert_approx_equals(sourceBuffer.buffered.start(0),
expectedBufferedRangeStartTime,
0.001,
"sourceBuffer.buffered range begins where expected before EOS");
assert_less_than_equal(sourceBuffer.buffered.end(0),
expectedBufferedRangeMaxEndTimeBeforeEOS + 0.001,
"sourceBuffer.buffered range ends at or before expected upper bound before EOS");
test.expectEvent(mediaSource, "sourceended", "mediaSource endOfStream");
......
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