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

show() must be triggered by user activation #9990

Merged
merged 3 commits into from Mar 14, 2018

Conversation

Projects
None yet
5 participants
@marcoscaceres
Copy link
Contributor

marcoscaceres commented Mar 13, 2018

}
}, "Must be possible to construct a payment request");
promise_test(async t => {

This comment has been minimized.

Copy link
@marcoscaceres

marcoscaceres Mar 13, 2018

Author Contributor

@domenic, I'm a bit unsure if using setTimeout to race these two promises is ok? Basically, a conforming implementation would return acceptPromise as rejected with a SecurityError. However, in a non-conforming browser, calling .show() will show the payment sheet, causing the test to get stuck waiting on acceptPromise to resolve.

In order to avoid the test getting stuck, I call .abort() after 100 milliseconds. Is there a better was of doing this?

This comment has been minimized.

Copy link
@domenic

domenic Mar 13, 2018

Member

Generally we let tests timeout in non-conforming browsers. That way, their CI infrastructure can control the timeout period, instead of getting it hard-coded to 100 ms as here.

This comment has been minimized.

Copy link
@marcoscaceres

marcoscaceres Mar 13, 2018

Author Contributor

Makes sense. I’ll split this into manual and automated test files. Then the automated can time out.

marcoscaceres added some commits Mar 14, 2018

@w3c-bots

This comment has been minimized.

Copy link

w3c-bots commented Mar 14, 2018

Build PASSED

Started: 2018-03-14 00:49:56
Finished: 2018-03-14 00:51:27

View more information about this build on:

@marcoscaceres marcoscaceres merged commit 3686c5f into master Mar 14, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@marcoscaceres marcoscaceres deleted the show_manual_3 branch Mar 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.