-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WebDriver BiDi] Fix test for window.prompt opened #46441
[WebDriver BiDi] Fix test for window.prompt opened #46441
Conversation
I think we probably then have to update the BiDi spec, because now it assumes that |
@lutien We need the null check in the spec due to other algorithms ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lutien We need the null check in the spec due to other algorithms (
alert
,confirm
,beforeunload
), not having it send from the HTML spec. And it seemsdefault value
value forprompt
is always present and String. So we want the value to be omitted for the other types but our expectation should that it is always set forprompt
.
Ah, alright, that sounds reasonable to me. Thanks!
webdriver/tests/bidi/browsing_context/user_prompt_opened/user_prompt_opened.py
Outdated
Show resolved
Hide resolved
…prompt_opened.py Co-authored-by: Maksim Sadym <69349599+sadym-chromium@users.noreply.github.com>
Ref: web-platform-tests/wpt#46441, this need to be merged else test will fail. Also make the test run in CI. --------- Signed-off-by: Browser Automation Bot <browser-automation-bot@google.com> Co-authored-by: Browser Automation Bot <browser-automation-bot@google.com>
In the HTML IDL - https://html.spec.whatwg.org/#the-window-object the function is defined as:
prompt(optional DOMString message = "", optional DOMString default = "");
This means that if no value is passed it get empty string.
I also observed that all values passed to the second parameter get
toString
(ed) (I think this is the algorithm that does it https://webidl.spec.whatwg.org/#js-DOMString),Verified this behavior for Chrome, Firefox and Safari.