From 2fbf393640a76f5b803096db868fff58525c5cbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang?= Date: Wed, 21 Jun 2017 16:45:12 +0200 Subject: [PATCH] Add tests regarding navigation inside sandboxed iframes. (#6221) --- ...iframe_sandbox_allow_top_navigation-1.html | 34 +++++++++++++++++++ ...iframe_sandbox_allow_top_navigation-2.html | 34 +++++++++++++++++++ .../iframe_sandbox_navigate_ancestor-1.html | 12 +++++++ .../iframe_sandbox_navigate_ancestor-2.html | 12 +++++++ .../iframe_sandbox_navigate_descendants.html | 12 +++++++ .../iframe_sandbox_navigate_itself.html | 12 +++++++ ...that-performs-top-navigation-on-popup.html | 14 ++++++++ ...arent-and-sends-result-to-grandparent.html | 11 ++++++ ...me-tried-to-be-navigated-by-its-child.html | 4 +++ .../iframe-trying-to-navigate-its-child.html | 11 ++++++ .../iframe-trying-to-navigate-itself.html | 11 ++++++ 11 files changed, 167 insertions(+) create mode 100644 html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1.html create mode 100644 html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2.html create mode 100644 html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1.html create mode 100644 html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2.html create mode 100644 html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants.html create mode 100644 html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself.html create mode 100644 html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-on-popup.html create mode 100644 html/semantics/embedded-content/the-iframe-element/support/iframe-that-tries-to-navigate-parent-and-sends-result-to-grandparent.html create mode 100644 html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-its-child.html create mode 100644 html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-its-child.html create mode 100644 html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-itself.html diff --git a/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1.html b/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1.html new file mode 100644 index 00000000000000..b0875ec6b91582 --- /dev/null +++ b/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1.html @@ -0,0 +1,34 @@ + + + + + Check that sandboxed iframe can perform navigation on the top frame + when allow-top-navigation is set + + + + + + + + diff --git a/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2.html b/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2.html new file mode 100644 index 00000000000000..6113c6c347897c --- /dev/null +++ b/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2.html @@ -0,0 +1,34 @@ + + + + + Check that sandboxed iframe cannot perform navigation on the top + frame when allow-top-navigation is not set + + + + + + + + diff --git a/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1.html b/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1.html new file mode 100644 index 00000000000000..4cf48184c9bff2 --- /dev/null +++ b/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1.html @@ -0,0 +1,12 @@ + + +Check that sandboxed iframe can not navigate their ancestors + + + + diff --git a/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2.html b/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2.html new file mode 100644 index 00000000000000..159491c73ca401 --- /dev/null +++ b/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2.html @@ -0,0 +1,12 @@ + + +Check that unsandboxed iframe can navigate their ancestors + + + + diff --git a/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants.html b/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants.html new file mode 100644 index 00000000000000..0934adfa82ac83 --- /dev/null +++ b/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants.html @@ -0,0 +1,12 @@ + + +Check that sandboxed iframe can navigate their descendants + + + + diff --git a/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself.html b/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself.html new file mode 100644 index 00000000000000..12c4e0ca50236c --- /dev/null +++ b/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself.html @@ -0,0 +1,12 @@ + + +Check that sandboxed iframe can navigate itself + + + + diff --git a/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-on-popup.html b/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-on-popup.html new file mode 100644 index 00000000000000..0468278424f7e1 --- /dev/null +++ b/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-on-popup.html @@ -0,0 +1,14 @@ + + + + + + diff --git a/html/semantics/embedded-content/the-iframe-element/support/iframe-that-tries-to-navigate-parent-and-sends-result-to-grandparent.html b/html/semantics/embedded-content/the-iframe-element/support/iframe-that-tries-to-navigate-parent-and-sends-result-to-grandparent.html new file mode 100644 index 00000000000000..4b8930de42ff54 --- /dev/null +++ b/html/semantics/embedded-content/the-iframe-element/support/iframe-that-tries-to-navigate-parent-and-sends-result-to-grandparent.html @@ -0,0 +1,11 @@ + +

This is a frame that tries to navigate its parent.

+ diff --git a/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-its-child.html b/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-its-child.html new file mode 100644 index 00000000000000..50edc878adbbc3 --- /dev/null +++ b/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-its-child.html @@ -0,0 +1,4 @@ + +

If this message appears, then this frame has not been navigated by its child.

+ diff --git a/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-its-child.html b/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-its-child.html new file mode 100644 index 00000000000000..9ac754c418e1cf --- /dev/null +++ b/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-its-child.html @@ -0,0 +1,11 @@ + + + diff --git a/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-itself.html b/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-itself.html new file mode 100644 index 00000000000000..6755d295aa1799 --- /dev/null +++ b/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-itself.html @@ -0,0 +1,11 @@ + +

If this message appears, then this frame has not been navigated.

+