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

PaymentRequest "paymentmethodchanged" event #10912

Merged
merged 14 commits into from Jun 14, 2018
Merged

Conversation

marcoscaceres
Copy link
Contributor

@marcoscaceres marcoscaceres commented May 9, 2018

@marcoscaceres marcoscaceres changed the title Paymentmethodchanged PaymentRequest "paymentmethodchanged" event May 9, 2018
@@ -0,0 +1,69 @@
<!DOCTYPE html>
<!-- Copyright © 2017 Chromium authors and World Wide Web Consortium, (Massachusetts Institute of Technology, ERCIM, Keio University, Beihang). -->
Copy link
Member

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");
Copy link
Member

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"

Copy link
Contributor Author

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".

@marcoscaceres
Copy link
Contributor Author

Blocking merge, waiting on ok from implementers on the spec side.

@marcoscaceres
Copy link
Contributor Author

updated tests to match updated proposal.

@wpt-pr-bot wpt-pr-bot removed the request for review from rsolomakhin June 12, 2018 17:24
@wpt-pr-bot wpt-pr-bot requested review from jgraham and removed request for edenchuang June 12, 2018 17:24
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
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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>
Copy link
Member

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=

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh, woopsy...

@marcoscaceres
Copy link
Contributor Author

@gsnedders, take another look.

@marcoscaceres marcoscaceres merged commit cf68763 into master Jun 14, 2018
@gsnedders gsnedders deleted the paymentmethodchanged branch June 14, 2018 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants