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
PaymentRequest "paymentmethodchanged" event #10912
Conversation
@@ -0,0 +1,69 @@ | |||
<!DOCTYPE html> | |||
<!-- Copyright © 2017 Chromium authors and World Wide Web Consortium, (Massachusetts Institute of Technology, ERCIM, Keio University, Beihang). --> |
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.
I've noticed you remove this comment before and it's not included on the other two tests.
didHandle = true; | ||
}; | ||
request.dispatchEvent(ev); | ||
assert_true(didHandle, "event did not fire"); |
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.
Nit: I thought generally the assertion message should say what should be true (e.g. "must be same event") but for many you are indicating what doesn't happen if it fails.
e.g. this should be "event fired"
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.
Yeah, it's a bit all over the place and a matter of preference. The messages only show up when tests fail, so I tend to explain why something failed rather than why something passed. So:
Why did X fail? ..."event did not fire".
Blocking merge, waiting on ok from implementers on the spec side. |
updated tests to match updated proposal. |
Avoid potential confusion that this should be supported with basic card
29a384b
to
773c20a
Compare
lint.whitelist
Outdated
@@ -326,6 +326,7 @@ OPEN-NO-MODE: css/* | |||
PRINT STATEMENT: css/* | |||
CONTENT-VISUAL: css/* | |||
CONTENT-MANUAL: css/* | |||
CONTENT-VISUAL: payment-request/PaymentMethodChangeEvent/methodName-attribute.https.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 seems wrong. Why is it getting picked up as a visual 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.
agree... filed #11479 because this is not documented.
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.
(reverting this, btw)
<meta charset="utf-8"> | ||
<title>Test for PaymentMethodChangeEvent.methodName attribute</title> | ||
<link rel="help" href="https://w3c.github.io/browser-payment-api/#dom-paymentmethodchangeevent-src"> | ||
<script="/resources/testharness.js"></script> |
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 needs to be <script src=
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.
oh, woopsy...
This reverts commit 99cbcd2.
@gsnedders, take another look. |
Tests for w3c/payment-request#695