wpt: Turn on selectFiles and handle asynchronicity in FileAPI test#40349
Merged
mrobinson merged 1 commit intoservo:mainfrom Nov 2, 2025
Merged
wpt: Turn on selectFiles and handle asynchronicity in FileAPI test#40349mrobinson merged 1 commit intoservo:mainfrom
selectFiles and handle asynchronicity in FileAPI test#40349mrobinson merged 1 commit intoservo:mainfrom
Conversation
TimvdLippe
approved these changes
Nov 2, 2025
Comment on lines
+20
to
+23
| reader.onloadend = this.step_func(function(evt) { | ||
| assert_equals(evt.target.result, "hello, servo\n"); | ||
| this.done(); | ||
| }); |
Contributor
There was a problem hiding this comment.
Nit: can be a single invocation as well:
Suggested change
| reader.onloadend = this.step_func(function(evt) { | |
| assert_equals(evt.target.result, "hello, servo\n"); | |
| this.done(); | |
| }); | |
| reader.onloadend = this.step_func_done(function(evt) { | |
| assert_equals(evt.target.result, "hello, servo\n"); | |
| }); |
| takeScreenshot(); | ||
| }); | ||
| image.src = URL.createObjectURL(inputElement.files[0]); | ||
| console.log(url); |
Contributor
There was a problem hiding this comment.
Is this left-over or required for the test?
Member
Author
There was a problem hiding this comment.
Nope, this is left over from my work on the tests. Thanks for pointing it out.
c66d43c to
7e104b4
Compare
This change fixes the Servo-specific FileAPI tests which need the special `SelectFiles` API. In addition, file selection is now totally asynchronous, so update the tests to handle this. Once we switch to WebDriver to run tests, these tests can use test driver APIs and we can remove `selectFiles` entirely. Signed-off-by: Martin Robinson <[email protected]>
7e104b4 to
1b1249c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change fixes the Servo-specific FileAPI tests which need the
special
SelectFilesAPI. In addition, file selection is now totallyasynchronous, so update the tests to handle this.
Testing: This change fixes some tests.
Fixes: #40348.