From 79b5ffb00755b34873bf83171ab1d2f36dd208a7 Mon Sep 17 00:00:00 2001 From: Dave Tapuska Date: Wed, 14 Aug 2019 10:57:02 +0000 Subject: [PATCH] Bug 1573203 [wpt PR 18391] - Add tests to prevent a sandbox iframe from using history APIs, a=testonly Automatic update from web-platform-tests Add tests to prevent a sandbox iframe from using history APIs Spec change https://github.com/whatwg/html/pull/4787 BUG=705583 Change-Id: I6fc5fee627156c10c771b63b609d1d25c6fd439c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1749444 Reviewed-by: Domenic Denicola Commit-Queue: Domenic Denicola Cr-Commit-Position: refs/heads/master@{#686032} -- wpt-commits: 5d435e04f41adf7c891c575b3f8ab120923766fe wpt-pr: 18391 --- ...me_sandbox_navigate_history_go_back-2.html | 16 +++++++++++ ...rame_sandbox_navigate_history_go_back.html | 18 ++++++++++++ ...e_sandbox_navigate_history_go_forward.html | 28 +++++++++++++++++++ ...rame-tried-to-be-navigated-by-history.html | 18 ++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back-2.html create mode 100644 testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back.html create mode 100644 testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_forward.html create mode 100644 testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-history.html diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back-2.html b/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back-2.html new file mode 100644 index 0000000000000..7a94f1ce4a867 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back-2.html @@ -0,0 +1,16 @@ + + +Check that sandboxed iframe can navigate their self + + + + diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back.html b/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back.html new file mode 100644 index 0000000000000..7026edf8f92b6 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back.html @@ -0,0 +1,18 @@ + + +Check that sandboxed iframe can not navigate their ancestors + + + + diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_forward.html b/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_forward.html new file mode 100644 index 0000000000000..e9d1def099e3a --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_forward.html @@ -0,0 +1,28 @@ + + +Check that sandboxed iframe can not navigate their ancestors + + + + diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-history.html b/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-history.html new file mode 100644 index 0000000000000..c4ba8011f9d28 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-history.html @@ -0,0 +1,18 @@ + +

This is a frame that tries to navigate via history API.

+