| Summary: | window.atob() returns wrong value when given a string container only white spaces | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | ap, bfulgham, karlcow |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
|
Description
Ahmad Saleem
2023-01-14 04:55:21 PST
Test - https://jsfiddle.net/2q73Lwf4/show Failing (in STP161 & Firefox Nightly 111): FAIL window.btoa() should throw TypeError: Failed to execute 'btoa' on 'Window': 1 argument required, but only 0 present.. Threw exception TypeError: Not enough arguments. FAIL window.atob() should throw TypeError: Failed to execute 'atob' on 'Window': 1 argument required, but only 0 present.. Threw exception TypeError: Not enough arguments. ______ Chrome Canary 111 passes all. All the tests pass in https://wpt.fyi/results/html/webappapis/atob/base64.any.html?label=experimental&label=master&aligned The Fiddle test is wrong. It is trying to test the full error message. https://jsfiddle.net/2q73Lwf4/show Safari TP 161 typeerror: Not enough arguments Firefox Nightly 110 Uncaught TypeError: Window.atob: At least 1 argument required, but only 0 passed Chrome Canary 111 Uncaught TypeError: Failed to execute 'atob' on 'Window': 1 argument required, but only 0 present. They all throw with TypeError with window.atob() and they all return the empty string '' for window.atob(" ") |