Skip to content

Test range requests with non-matching range in response#33491

Merged
noamr merged 3 commits intomasterfrom
range-no-match
Apr 7, 2022
Merged

Test range requests with non-matching range in response#33491
noamr merged 3 commits intomasterfrom
range-no-match

Conversation

@noamr
Copy link
Copy Markdown
Contributor

@noamr noamr commented Apr 4, 2022

No description provided.

@noamr noamr requested a review from karlt April 5, 2022 11:53
Copy link
Copy Markdown
Contributor

@karlt karlt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

], 'ok', 'Range response out of range of request');
range_rewrite_test([{request: ['0', '*'], status: 200}], 'ok', 'Range requests ignored (200 status)');
</script>
</body No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing closing '>', and I assume convention is to have a newline.

Comment on lines +22 to +26
const ok = new Promise(resolve =>
setInterval(t.step_func(() => {
if (video.currentTime > 0.1)
resolve('ok');
}, 100)));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The poll could be avoided by using the "onplay" event, which signals when HAVE_ENOUGH_DATA is reached. That is not reached with 100 bytes.
Something like const ok = new Promise(resolve => video.onplay = () => resolve('ok'));.

Comment on lines +5 to +7
<script src="/common/get-host-info.sub.js"></script>
<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
<script src="resources/utils.js"></script>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These three don't appear to be necessary.

@noamr noamr merged commit 33e3ce1 into master Apr 7, 2022
@noamr noamr deleted the range-no-match branch April 7, 2022 12:03
DanielRyanSmith pushed a commit to DanielRyanSmith/wpt that referenced this pull request Apr 27, 2022
…-tests#33491)

* Test range requests with non-matching range in response

* Put meta before scripts

* Use play event instead of polling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants