web-platform-tests / web-platform-tests/wpt
Missing <canvas> toDataURL / toBlob tests
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 6.2k
- Forks
- 3.9k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 586
Description
From @junov (more context at https://github.com/whatwg/html/pull/2343):
Calls to toDataURL and to toBlob may experience internal errors in the image encoders. Creating the necessary conditions for such failures to occur reliably in all browsers is an unsolved problem. Therefore, there are no tests covering the behavior of toDataURL and toBlob in cases where the encoding fails.
Missing tests:
- The toDataURL method of the HTMLCanvasElement interface should return the string "data:," when an encoding error occurs.
- The toBlob method of the HTMLCanvasElement interface, when an encoding error occurs, should invoke the callback passing null as the blob argument.
This issue makes sure we keep track of this missing coverage.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the HTMLCanvasElement toDataURL and toBlob entry points and read the context from WHATWG HTML pull request 2343. Determine how encoding failures can be triggered reliably across browsers, then add coverage for the specified return value and callback behavior when encoding fails.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript
- Domain
- testing-qa, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100