web-platform-tests / web-platform-tests/wpt

Missing <canvas> toDataURL / toBlob tests

Open
#4,802 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

deferred html type:missing-coverage type:untestable
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.