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

Small cleanup of algorithm test #7317

Merged
merged 1 commit into from
Sep 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 5 additions & 16 deletions payment-request/algorithms-manual.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,10 @@
requestShipping: true,
};

test(() => {
const request = new PaymentRequest(
methods,
detailsNoShippingOptions,
options
);
}, "Smoke test");

function testFireEvent(button, details, eventName, expectRequestProps) {
button.disabled = true;
promise_test(async t => {
new PaymentRequest(methods, detailsNoShippingOptions, options);
const request = new PaymentRequest(methods, details, options);
const events = [];
const p1 = new Promise(resolve => {
Expand All @@ -97,12 +90,8 @@
resolve("listener-2");
});
});
try {
const response = await request.show();
response.complete("success");
} catch (err) {
assert_unreached("Unexpected exception: " + err.message);
}
const response = await request.show();
response.complete("success");
const [handler, listener1, listener2] = await Promise.all([p1, p2, p3]);
assert_equals(
handler,
Expand Down Expand Up @@ -164,7 +153,7 @@ <h2 id="abort-algo">
<h2 id="shipping-address-changed-algo">Shipping address changed algorithm</h2>
<link rel="help" href="https://www.w3.org/TR/payment-request/#shipping-address-changed-algorithm">
<p>
When prompted, please enter or select "web platform test" as recipient, at address "1 wpt street" in "Kabul, Afghanistan", zip/postal code 1001.
When prompted, please change or enter a new shipping address and then select Pay.
</p>
<ol>
<li>
Expand All @@ -179,7 +168,7 @@ <h2 id="shipping-address-changed-algo">Shipping address changed algorithm</h2>
<h2 id="shipping-option-changed-algo">Shipping option changed algorithm</h2>
<link rel="help" href="https://w3c.github.io/payment-request/#shipping-option-changed-algorithm">
<p>
When prompted, please select "shipping option 2".
Finally, when prompted, please select "shipping option 2" and then select Pay.
</p>
<ol>
<li>
Expand Down