-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Test that PaymentRequest throws when its document is not active #4309
Conversation
Notifying @halindrome. (Learn how reviewing works.) |
FirefoxTesting revision 70f5f94 All results/payment-request/allowpaymentrequest/basic.https.html
/payment-request/allowpaymentrequest/active-document-same-origin.https.html
/payment-request/allowpaymentrequest/active-document-cross-origin.https.sub.html
|
ChromeTesting revision 70f5f94 All results/payment-request/allowpaymentrequest/basic.https.html
/payment-request/allowpaymentrequest/active-document-same-origin.https.html
/payment-request/allowpaymentrequest/active-document-cross-origin.https.sub.html
|
The PaymentRequest tests need Experimental Web Platform features enabled in Chrome. For me those 3 tests pass in Chrome canary 57.0.2951.0 with experimental features enabled. |
I see now why If I change the test to use the prefixed names then Chromium neither enters fullscreen but also doesn't fire a |
Unprefixing is https://bugs.chromium.org/p/chromium/issues/detail?id=383813
Filed https://bugs.chromium.org/p/chromium/issues/detail?id=674454 |
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.
Suggest splitting Fullscreen into a separate PR as tests for whatwg/fullscreen#67
onload = () => { | ||
var iframes = document.getElementsByTagName("iframe"); | ||
trusted_request(iframes[0].contentDocument.body, document.body); | ||
window[0].location.href = '/common/blank.html'; |
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.
This throws an exception I guess?
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.
No?
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.
What does window[0]
mean? Isn't it just undefined?
<script> | ||
async_test((t) => { | ||
onload = () => { | ||
var iframes = document.getElementsByTagName("iframe"); |
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.
Maybe document.querySelector("iframe")
to save some later [0]
?
<iframe allowfullscreen></iframe> | ||
<script> | ||
async_test((t) => { | ||
onload = () => { |
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.
Don't need to wait for load I think, but if you t.step_func
is needed. (Or is it? I can never remember if testharness.js gets it right if there's just a single async_test.
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.
Right onload is not necessary. Will fix.
9f91238
to
45c4685
Compare
Fullscreen test moved to #4334 |
LGTM |
See
whatwg/html#2160
w3c/payment-request#361