зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1620225
[wpt PR 22101] - [Trusted Types] Removed trustedTypes.getPolicyNames()., a=testonly
Automatic update from web-platform-tests [Trusted Types] Removed trustedTypes.getPolicyNames(). Context: https://github.com/w3c/webappsec-trusted-types/issues/235 Bug: 739170 Change-Id: I8499534f4351ea2c9f689071f3d6510238382d72 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089651 Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org> Commit-Queue: Daniel Vogelheim <vogelheim@chromium.org> Auto-Submit: Krzysztof Kotowicz <koto@google.com> Cr-Commit-Position: refs/heads/master@{#747250} -- wpt-commits: d8dea9c9ca97bab3138d89db56e707046533680f wpt-pr: 22101
This commit is contained in:
Родитель
1e5ac9a286
Коммит
26bca2c491
|
@ -23,7 +23,6 @@ interface TrustedScriptURL {
|
|||
interface TrustedTypePolicyFactory {
|
||||
[Unforgeable] TrustedTypePolicy createPolicy(DOMString policyName, TrustedTypePolicyOptions policyOptions);
|
||||
// All the policy object names that have been created
|
||||
[Unforgeable] sequence<DOMString> getPolicyNames();
|
||||
};
|
||||
|
||||
[Exposed=(Window, Worker)]
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="/resources/testharness.js" ></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/helper.sub.js"></script>
|
||||
|
||||
<meta http-equiv="Content-Security-Policy" content="trusted-types *">
|
||||
<body>
|
||||
<script>
|
||||
test(t => {
|
||||
let policy = trustedTypes.createPolicy('thisisaname', {});
|
||||
assert_true(policy instanceof TrustedTypePolicy);
|
||||
assert_equals(policy.name, 'thisisaname');
|
||||
}, "policy.name = name");
|
||||
|
||||
|
||||
// Retrieve policy names tests
|
||||
test(t => {
|
||||
let policy = trustedTypes.createPolicy('anothername', {});
|
||||
let names = trustedTypes.getPolicyNames();
|
||||
assert_equals(names.length, 2);
|
||||
assert_true(names.includes('thisisaname'));
|
||||
assert_true(names.includes('anothername'));
|
||||
}, "getPolicyNames returns all policy names");
|
||||
</script>
|
|
@ -20,14 +20,6 @@
|
|||
});
|
||||
}, "duplicate policy name attempt throws");
|
||||
|
||||
// Retrieve policy names tests
|
||||
test(t => {
|
||||
let policy = trustedTypes.createPolicy('SomeOtherName', {} );
|
||||
let names = trustedTypes.getPolicyNames();
|
||||
assert_true(names.includes('SomeName'));
|
||||
assert_true(names.includes('SomeOtherName'));
|
||||
}, "Retrieving policy names");
|
||||
|
||||
// Check error messages.
|
||||
test(t => {
|
||||
try {
|
||||
|
|
Загрузка…
Ссылка в новой задаче