KEMBAR78
PaymentRequest "paymentmethodchanged" event by marcoscaceres · Pull Request #10912 · web-platform-tests/wpt · GitHub
Skip to content

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.

@marcoscaceres marcoscaceres force-pushed the paymentmethodchanged branch from 29a384b to 773c20a Compare June 12, 2018 16:55
@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
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.

5 participants