gecko-dev/testing/web-platform/tests/feature-policy/payment-supported-by-feature-policy.tentative.html
Ian Clelland e59ac37dd7 Bug 1523562 [wpt PR 14827] - Feature Policy JS API Update: Add document.featurePolicy.features, a=testonly
Automatic update from web-platform-tests
Feature Policy JS API Update: Add document.featurePolicy.features

This adds a method to return the names of all policy-controlled
features supported by the browser. Because this list is determined by
the set of features implemented by Chrome, rather than conformance to
any particular spec, the tests are in /webexposed/ rather than WPT.

(Existing IDL tests in WPT cover the existence of the new method and
the data types that it returns, without depending on the exact values
returned.)

Bug: 917070
Change-Id: I35ccbdce794e236500d15afe5419057a8f162ae7
Reviewed-on: https://chromium-review.googlesource.com/c/1387151
Commit-Queue: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625667}

--

wpt-commits: f4c41eec30303b282c8107f35c788ffd125dd567
wpt-pr: 14827
2019-02-07 21:51:02 +00:00

12 lines
528 B
HTML

<!DOCTYPE html>
<title>Test that payment is advertised in the feature list</title>
<link rel="help" href="https://w3c.github.io/webappsec-feature-policy/#dom-featurepolicy-features">
<link rel="help" href="https://github.com/w3c/payment-request/issues/600">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
assert_in_array('payment', document.featurePolicy.features());
}, 'document.featurePolicy.features should advertise payment.');
</script>