WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
250618
window.atob() returns wrong value when given a string container only white spaces
https://bugs.webkit.org/show_bug.cgi?id=250618
Summary
window.atob() returns wrong value when given a string container only white sp...
Ahmad Saleem
Reported
2023-01-14 04:55:21 PST
Hi Team, While going through Blink's commit, I came across another failing test: Blink Commit -
https://chromium.googlesource.com/chromium/blink/+/4a9564e53be4b85ac10a463b3dac03f59b7cba18
WebKit Source -
https://searchfox.org/wubkat/source/Source/WTF/wtf/text/Base64.cpp#192
Just wanted to raise so if needed, we can fix it. Will tag others to get input. Thanks!
Attachments
Add attachment
proposed patch, testcase, etc.
Ahmad Saleem
Comment 1
2023-01-19 05:32:54 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.
Karl Dubost
Comment 2
2023-01-19 21:18:02 PST
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(" ")
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug