gecko-dev/testing/web-platform/tests/payment-handler/can-make-payment-event-constructor.https.worker.js
Jinho Bang 5878d2f49d Bug 1464182 [wpt PR 11146] - PaymentHandler: Fix a crash when creating event object with empty data, a=testonly
Automatic update from web-platform-testsPaymentHandler: Fix a crash when creating event object with empty data

The following codes cause crashes in current implementation.
  - new CanMakePaymentEvent("canmakepaymentevent", {});
  - new PaymentRequestEvent("paymentrequestevent", {});

This patch fixes the problem and fixes/adds WPT tests.

Bug: none
Change-Id: I95375f1148d69a17075d393990e3726ad2bf1cf3
Reviewed-on: https://chromium-review.googlesource.com/1070957
Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
Reviewed-by: Ganggui Tang <gogerald@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563903}

--

wpt-commits: 1dc612f2ed6a6bec861a90ad9bfa9a4336165dcd
wpt-pr: 11146
2018-06-25 21:22:21 +00:00

7 lines
183 B
JavaScript

importScripts('/resources/testharness.js');
test(() => {
assert_false('CanMakePaymentEvent' in self);
}, 'CanMakePaymentEvent constructor must not be exposed in worker');
done();