Commit 28620663 authored by Bin Lu's avatar Bin Lu Committed by Commit Bot

Add missing flags to the iframe sandbox supported list.

Add missing flags to the iframe sandbox supported list, and add tests.
Also remove the runtime config for 'allow-top-navigation-by-user-activation' since the feature has shipped a long time ago.

Bug: 662506
Change-Id: I458210f6133ddd5e30b507214b003ff0fb596761
Reviewed-on: https://chromium-review.googlesource.com/965843
Commit-Queue: Bin Lu <binlu@chromium.org>
Reviewed-by: default avatarMike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543733}
parent ef19cb54
......@@ -24,5 +24,6 @@
assert_true(iframe.sandbox.supports("allow-same-origin"));
assert_true(iframe.sandbox.supports("allow-scripts"));
assert_true(iframe.sandbox.supports("allow-top-navigation"));
assert_true(iframe.sandbox.supports("allow-top-navigation-by-user-activation"));
}, "Make sure that sandbox based feature detection is working");
</script>
......@@ -11,9 +11,11 @@ namespace blink {
namespace {
const char* const kSupportedSandboxTokens[] = {
"allow-downloads", "allow-forms", "allow-modals",
"allow-pointer-lock", "allow-popups", "allow-popups-to-escape-sandbox",
"allow-same-origin", "allow-scripts", "allow-top-navigation"};
"allow-downloads", "allow-forms",
"allow-modals", "allow-pointer-lock",
"allow-popups", "allow-popups-to-escape-sandbox",
"allow-same-origin", "allow-scripts",
"allow-top-navigation", "allow-top-navigation-by-user-activation"};
bool IsTokenSupported(const AtomicString& token) {
for (const char* supported_token : kSupportedSandboxTokens) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment