Skip to content
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

RFC 73 : Add testdriver.js support for the timeZone WebDriver command. #73

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions rfcs/testdriver_set_time_zone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# RFC 73 : Add testdriver.js support for the `timeZone` WebDriver command.

## Summary
Add testdriver.js support for the `timeZone` WebDriver extension, which will
allow setting the current time zone in the browser. This extension is specced
as part of the [HTML spec](https://github.com/whatwg/html/pull/3047).

## Details
Changing the time zone is not available via normal web APIs. To test the effect
of changing time zone on the `ontimezonechange` event there needs to be a way
stephenmcgruer marked this conversation as resolved.
Show resolved Hide resolved
to instruct the browser to act as if the time zone is changing: this WebDriver
extension provides that ability.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth mentioning that this command is also useful to test PWAs that take into account the user's local time zone? IOW, it's useful even if timezonechange didn't exist.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you thinking from the context of WPT still, or from the context of a web-developer (or PWA developer) who might want to test their site/app?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, I was talking about the WebDriver command, not the testdriver.js change. Ignore me! :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not at all - that info helps inform us that this WebDriver extension is probably useful outside of the scope of WPT. Those tend to be even easier to accept, since there's a valid use for them in the 'real world' :)


## Risks
* The WebDriver endpoint is new and may still require changes, which would then
affect the testdriver.js API as well.
* The WebDriver endpoint is very specific and will likely only be used for a
small set of tests, so the maintenance to value ratio may be low.
* That said, testdriver.js is designed to make supporting a command
low-maintenance, and to not require every executor to support every
testdriver.js command.