From b520a7f4197495dc76a3f6e1557cda60900d662a Mon Sep 17 00:00:00 2001 From: Dave Tapuska Date: Mon, 12 Aug 2019 10:10:26 -0700 Subject: [PATCH] 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} --- ...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 html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back-2.html create mode 100644 html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back.html create mode 100644 html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_forward.html create mode 100644 html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-history.html diff --git a/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back-2.html b/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back-2.html new file mode 100644 index 000000000000000..7a94f1ce4a867ce --- /dev/null +++ b/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/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back.html b/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back.html new file mode 100644 index 000000000000000..7026edf8f92b680 --- /dev/null +++ b/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/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_forward.html b/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_forward.html new file mode 100644 index 000000000000000..e9d1def099e3a37 --- /dev/null +++ b/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/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-history.html b/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-history.html new file mode 100644 index 000000000000000..c4ba8011f9d288b --- /dev/null +++ b/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.

+