Diff
Modified: trunk/LayoutTests/ChangeLog (267691 => 267692)
--- trunk/LayoutTests/ChangeLog 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/ChangeLog 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,3 +1,15 @@
+2020-09-27 Rob Buis <[email protected]>
+
+ Resync web-platform-tests/html/semantics/the-iframe-element from upstream
+ https://bugs.webkit.org/show_bug.cgi?id=217033
+
+ Reviewed by Sam Weinig.
+
+ Adjust for tentative extension removal.
+
+ * platform/mac-wk1/TestExpectations:
+ * platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_anchor_download_block_downloads.sub.tentative-expected.txt:
+
2020-09-26 Darin Adler <[email protected]>
Remove trailing spaces from all expected.txt files outside the web-platform-tests directory
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,3 +1,45 @@
+2020-09-27 Rob Buis <[email protected]>
+
+ Resync web-platform-tests/html/semantics/the-iframe-element from upstream
+ https://bugs.webkit.org/show_bug.cgi?id=217033
+
+ Reviewed by Sam Weinig.
+
+ Resync web-platform-tests/html/semantics/the-iframe-element from upstream a520598adb3957def27f1b63c6bff62e891ccbda.
+
+ * resources/resource-files.json:
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/historical-expected.txt:
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/historical.html:
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.tentative-expected.txt.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.tentative.html.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative-expected.txt.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative.html.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative-expected.txt.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative.html.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-expected.txt: Added.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.tentative-expected.txt.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.tentative.html.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times.tentative-expected.txt.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times.tentative.html.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.tentative-expected.txt.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.tentative.html.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager.tentative-expected.txt.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager.tentative.html.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative.html.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative-expected.txt: Removed.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-network-error.sub-expected.txt: Added.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-network-error.sub.html: Added.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_anchor_download_block_downloads.sub.tentative-expected.txt:
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_anchor_download_block_downloads.sub.tentative.html:
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_allow_downloads.sub.tentative-expected.txt:
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_allow_downloads.sub.tentative.html:
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_block_downloads.sub.tentative-expected.txt:
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_block_downloads.sub.tentative.html:
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/sandbox-toggle-in-inactive-document-crash.html: Added.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/download_stash.py:
+ (main):
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log:
+
2020-09-27 Darin Adler <[email protected]>
Remove trailing spaces from the last few expected.txt files that have them
Modified: trunk/LayoutTests/imported/w3c/resources/resource-files.json (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/resources/resource-files.json 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/resources/resource-files.json 2020-09-28 06:36:34 UTC (rev 267692)
@@ -2410,6 +2410,7 @@
"web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_helper-3.html",
"web-platform-tests/html/semantics/embedded-content/the-iframe-element/same_origin_child.html",
"web-platform-tests/html/semantics/embedded-content/the-iframe-element/same_origin_grandchild.html",
+ "web-platform-tests/html/semantics/embedded-content/the-iframe-element/sandbox-toggle-in-inactive-document-crash.html",
"web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/blank.htm",
"web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/document-with-embedded-svg.html",
"web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-checks-contentDocument.html",
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/historical-expected.txt (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/historical-expected.txt 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/historical-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,3 +1,4 @@
PASS iframe.seamless should not be supported
+PASS iframe.allowPaymentRequest should not be supported
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/historical.html (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/historical.html 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/historical.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -13,4 +13,8 @@
// added in https://github.com/whatwg/html/commit/f6490f17f577fa3478791b29ad8c2b586418001f
// removed in https://github.com/whatwg/html/commit/1490eba4dba5ab476f0981443a86c01acae01311
t('seamless');
+
+// Added by https://github.com/whatwg/html/pull/2133
+// Removed by https://github.com/whatwg/html/pull/5915
+t('allowPaymentRequest');
</script>
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager-expected.txt (from rev 267691, trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.tentative-expected.txt) (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,5 @@
+
+
+
+PASS Test that iframes with loading='eager' load immediately regardless of their position with respect to the viewport.
+
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.html (from rev 267691, trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.tentative.html) (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<head>
+ <title>Iframes with loading='eager' load immediately regardless of their
+ position with respect to the viewport.</title>
+ <link rel="author" title="Scott Little" href=""
+ <link rel="help" href=""
+ <script src=""
+ <script src=""
+</head>
+
+<script>
+ const t = async_test("Test that iframes with loading='eager' load " +
+ "immediately regardless of their position with " +
+ "respect to the viewport.");
+
+ let has_in_viewport_loaded = false;
+ const in_viewport_iframe_onload = t.step_func(() => {
+ assert_false(has_in_viewport_loaded,
+ "The in_viewport element should load only once.");
+ has_in_viewport_loaded = true;
+ });
+
+ let has_below_viewport_loaded = false;
+ const below_viewport_iframe_onload = t.step_func(() => {
+ assert_false(has_below_viewport_loaded,
+ "The below_viewport element should load only once.");
+ has_below_viewport_loaded = true;
+ });
+
+ window.addEventListener("load", t.step_func_done(() => {
+ assert_true(has_in_viewport_loaded,
+ "The in_viewport element should have loaded before " +
+ "window.load().");
+ assert_true(has_below_viewport_loaded,
+ "The below_viewport element should have loaded before " +
+ "window.load().");
+ }));
+</script>
+
+<body>
+ <iframe id="in_viewport" src=""
+ loading="eager" width="200px" height="100px"
+ _onload_="in_viewport_iframe_onload();"></iframe>
+ <div style="height:1000vh;"></div>
+
+ <!-- The below_viewport element loads very slowly in order to ensure that the
+ window load event is blocked on it. -->
+ <iframe id="below_viewport"
+ src=""
+ loading="eager" width="200px" height="100px"
+ _onload_="below_viewport_iframe_onload();"></iframe>
+</body>
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.tentative-expected.txt (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.tentative-expected.txt 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.tentative-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,5 +0,0 @@
-
-
-
-PASS Test that iframes with loading='eager' load immediately regardless of their position with respect to the viewport.
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.tentative.html (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.tentative.html 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.tentative.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,52 +0,0 @@
-<!DOCTYPE html>
-<head>
- <title>Iframes with loading='eager' load immediately regardless of their
- position with respect to the viewport.</title>
- <link rel="author" title="Scott Little" href=""
- <link rel="help" href=""
- <script src=""
- <script src=""
-</head>
-
-<script>
- const t = async_test("Test that iframes with loading='eager' load " +
- "immediately regardless of their position with " +
- "respect to the viewport.");
-
- let has_in_viewport_loaded = false;
- const in_viewport_iframe_onload = t.step_func(() => {
- assert_false(has_in_viewport_loaded,
- "The in_viewport element should load only once.");
- has_in_viewport_loaded = true;
- });
-
- let has_below_viewport_loaded = false;
- const below_viewport_iframe_onload = t.step_func(() => {
- assert_false(has_below_viewport_loaded,
- "The below_viewport element should load only once.");
- has_below_viewport_loaded = true;
- });
-
- window.addEventListener("load", t.step_func_done(() => {
- assert_true(has_in_viewport_loaded,
- "The in_viewport element should have loaded before " +
- "window.load().");
- assert_true(has_below_viewport_loaded,
- "The below_viewport element should have loaded before " +
- "window.load().");
- }));
-</script>
-
-<body>
- <iframe id="in_viewport" src=""
- loading="eager" width="200px" height="100px"
- _onload_="in_viewport_iframe_onload();"></iframe>
- <div style="height:1000vh;"></div>
-
- <!-- The below_viewport element loads very slowly in order to ensure that the
- window load event is blocked on it. -->
- <iframe id="below_viewport"
- src=""
- loading="eager" width="200px" height="100px"
- _onload_="below_viewport_iframe_onload();"></iframe>
-</body>
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2-expected.txt (from rev 267691, trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative-expected.txt) (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,4 @@
+
+
+PASS When a loading=lazy iframe is loaded, it loads relative to the document's base URL computed at parse-time.
+
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.html (from rev 267691, trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative.html) (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<head>
+ <title>Deferred loading=lazy iframes load relative to the document's base URL
+ at parse-time</title>
+ <link rel="author" title="Dom Farolino" href=""
+ <link rel="author" title="Raj T" href=""
+ <script src=""
+ <script src=""
+ <script src=""
+</head>
+
+<script>
+ const below_viewport_iframe = new ElementLoadPromise("below-viewport");
+
+ let has_window_loaded = false;
+
+ async_test(t => {
+ // Change the document's base URL to a bogus one, and scroll the
+ // below-viewport iframe into view. When it loads, it should load relative
+ // to the old base URL computed at parse-time.
+ window.addEventListener("load", t.step_func(() => {
+ window.history.pushState(2, document.title,
+ '/invalid-url-where-no-subresources-exist/')
+ has_window_loaded = true;
+ below_viewport_iframe.element().scrollIntoView();
+ }));
+
+ below_viewport_iframe.promise.then(t.step_func_done(() => {
+ assert_true(has_window_loaded,
+ "Below-viewport loading=lazy iframes do not block the " +
+ "window load event");
+ assert_true(below_viewport_iframe.element()
+ .contentDocument.body.innerHTML.includes("<p>Subframe</p>"));
+ }));
+
+ }, "When a loading=lazy iframe is loaded, it loads relative to the " +
+ "document's base URL computed at parse-time.");
+</script>
+
+<body>
+ <div style="height:1000vh;"></div>
+ <script>
+ // Change the document's base URL so that the iframe request parses relative
+ // to it when it sets up the request at parse-time.
+ window.history.pushState(1, document.title, 'resources/')
+ </script>
+ <iframe id="below-viewport" src="" loading="lazy" width="200px"
+ height="100px" _onload_="below_viewport_iframe.resolve()"</iframe>
+</body>
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative-expected.txt (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative-expected.txt 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,4 +0,0 @@
-
-
-PASS When a loading=lazy iframe is loaded, it loads relative to the document's base URL computed at parse-time.
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative.html (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative.html 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<head>
- <title>Deferred loading=lazy iframes load relative to the document's base URL
- at parse-time</title>
- <link rel="author" title="Dom Farolino" href=""
- <link rel="author" title="Raj T" href=""
- <script src=""
- <script src=""
- <script src=""
-</head>
-
-<script>
- const below_viewport_iframe = new ElementLoadPromise("below-viewport");
-
- let has_window_loaded = false;
-
- async_test(t => {
- // Change the document's base URL to a bogus one, and scroll the
- // below-viewport iframe into view. When it loads, it should load relative
- // to the old base URL computed at parse-time.
- window.addEventListener("load", t.step_func(() => {
- window.history.pushState(2, document.title,
- '/invalid-url-where-no-subresources-exist/')
- has_window_loaded = true;
- below_viewport_iframe.element().scrollIntoView();
- }));
-
- below_viewport_iframe.promise.then(t.step_func_done(() => {
- assert_true(has_window_loaded,
- "Below-viewport loading=lazy iframes do not block the " +
- "window load event");
- assert_true(below_viewport_iframe.element()
- .contentDocument.body.innerHTML.includes("<p>Subframe</p>"));
- }));
-
- }, "When a loading=lazy iframe is loaded, it loads relative to the " +
- "document's base URL computed at parse-time.");
-</script>
-
-<body>
- <div style="height:1000vh;"></div>
- <script>
- // Change the document's base URL so that the iframe request parses relative
- // to it when it sets up the request at parse-time.
- window.history.pushState(1, document.title, 'resources/')
- </script>
- <iframe id="below-viewport" src="" loading="lazy" width="200px"
- height="100px" _onload_="below_viewport_iframe.resolve()"</iframe>
-</body>
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-expected.txt (from rev 267691, trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative-expected.txt) (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,4 @@
+
+
+PASS When a loading=lazy iframe is loaded, it loads relative to the document's base URL computed at parse-time.
+
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.html (from rev 267691, trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative.html) (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<head>
+ <title>Deferred iframes with loading='lazy' use the original
+ base URL specified at parse-time</title>
+ <link rel="author" title="Rob Buis" href=""
+ <script src=""
+ <script src=""
+ <script src=""
+ <base href=''>
+</head>
+
+<script>
+ const below_viewport_iframe = new ElementLoadPromise("below-viewport");
+
+ let has_window_loaded = false;
+
+ async_test(t => {
+ // Change the base URL and scroll down to load the deferred iframe.
+ window.addEventListener("load", t.step_func(() => {
+ const base = document.querySelector('base');
+ base.href = '';
+ has_window_loaded = true;
+ below_viewport_iframe.element().scrollIntoView();
+ }));
+
+ below_viewport_iframe.promise.then(
+ t.step_func_done(() => {
+ assert_true(has_window_loaded,
+ "Below-viewport loading=lazy iframes do not block the " +
+ "window load event");
+ assert_true(below_viewport_iframe.element().contentDocument.body.
+ innerHTML.includes("<p>Subframe</p>"),
+ "The loading=lazy iframe's content is accessible upon loading");
+ }));
+
+ }, "When a loading=lazy iframe is loaded, it loads relative to the " +
+ "document's base URL computed at parse-time.");
+</script>
+
+<body>
+ <div style="height:1000vh"></div>
+ <iframe id="below-viewport" src="" loading="lazy"
+ width="200px" height="100px" _onload_="below_viewport_iframe.resolve()">
+ </iframe>
+</body>
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative-expected.txt (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative-expected.txt 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,4 +0,0 @@
-
-
-PASS When a loading=lazy iframe is loaded, it loads relative to the document's base URL computed at parse-time.
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative.html (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative.html 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,45 +0,0 @@
-<!DOCTYPE html>
-<head>
- <title>Deferred iframes with loading='lazy' use the original
- base URL specified at parse-time</title>
- <link rel="author" title="Rob Buis" href=""
- <script src=""
- <script src=""
- <script src=""
- <base href=''>
-</head>
-
-<script>
- const below_viewport_iframe = new ElementLoadPromise("below-viewport");
-
- let has_window_loaded = false;
-
- async_test(t => {
- // Change the base URL and scroll down to load the deferred iframe.
- window.addEventListener("load", t.step_func(() => {
- const base = document.querySelector('base');
- base.href = '';
- has_window_loaded = true;
- below_viewport_iframe.element().scrollIntoView();
- }));
-
- below_viewport_iframe.promise.then(
- t.step_func_done(() => {
- assert_true(has_window_loaded,
- "Below-viewport loading=lazy iframes do not block the " +
- "window load event");
- assert_true(below_viewport_iframe.element().contentDocument.body.
- innerHTML.includes("<p>Subframe</p>"),
- "The loading=lazy iframe's content is accessible upon loading");
- }));
-
- }, "When a loading=lazy iframe is loaded, it loads relative to the " +
- "document's base URL computed at parse-time.");
-</script>
-
-<body>
- <div style="height:1000vh"></div>
- <iframe id="below-viewport" src="" loading="lazy"
- width="200px" height="100px" _onload_="below_viewport_iframe.resolve()">
- </iframe>
-</body>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-expected.txt (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,9 @@
+
+
+
+PASS In-viewport iframes load eagerly
+PASS Below-viewport iframes load lazily
+FAIL Below-viewport srcdoc iframes load lazily assert_true: The window load event should have fired before the below-viewport srcdoc iframe loads expected true got false
+FAIL Below-viewport data: url iframes load lazily assert_true: The window load event should have fired before the below-viewport data url iframe loads expected true got false
+FAIL Below-viewport blob url iframes load lazily assert_true: The window load event should have fired before the below-viewport blob url iframe loads expected true got false
+
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event-expected.txt (from rev 267691, trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.tentative-expected.txt) (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,5 @@
+
+
+PASS In-viewport loading=lazy iframe does not block the load event
+PASS In-viewport loading=lazy visibility:hidden iframe does not block the load event
+
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.html (from rev 267691, trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.tentative.html) (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<head>
+ <title>In-viewport loading=lazy iframes do not block the window load event</title>
+ <link rel="author" title="Dom Farolino" href=""
+ <script src=""
+ <script src=""
+ <script src=""
+</head>
+
+<body>
+ <!-- This image blocks the window load event for 1 second -->
+ <img src=""
+
+ <!-- These iframes must load because they intersect the viewport, but they must
+ not block the window load event, because they are loading=lazy -->
+ <iframe id="visible" loading="lazy"
+ src=""
+ <iframe id="visibility_hidden" style="visibility:hidden;" loading="lazy"
+ src=""
+</body>
+
+<script>
+ const visible_iframe = document.querySelector('#visible');
+ const hidden_iframe = document.querySelector('#visibility_hidden');
+
+ const visible_iframe_t =
+ async_test('In-viewport loading=lazy iframe does not block the load event');
+
+ const hidden_iframe_t =
+ async_test('In-viewport loading=lazy visibility:hidden iframe does not ' +
+ 'block the load event');
+
+ let has_window_loaded = false;
+ window.addEventListener("load", () => {
+ has_window_loaded = true;
+ });
+
+ visible_iframe._onload_ = visible_iframe_t.step_func_done(() => {
+ assert_true(has_window_loaded,
+ "The visible iframe should not block the load event");
+ });
+
+ hidden_iframe._onload_ = hidden_iframe_t.step_func_done(() => {
+ assert_true(has_window_loaded,
+ "The hidden iframe should not block the load event");
+ });
+</script>
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.tentative-expected.txt (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.tentative-expected.txt 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.tentative-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,5 +0,0 @@
-
-
-PASS In-viewport loading=lazy iframe does not block the load event
-PASS In-viewport loading=lazy visibility:hidden iframe does not block the load event
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.tentative.html (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.tentative.html 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.tentative.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,47 +0,0 @@
-<!DOCTYPE html>
-<head>
- <title>In-viewport loading=lazy iframes do not block the window load event</title>
- <link rel="author" title="Dom Farolino" href=""
- <script src=""
- <script src=""
- <script src=""
-</head>
-
-<body>
- <!-- This image blocks the window load event for 1 second -->
- <img src=""
-
- <!-- These iframes must load because they intersect the viewport, but they must
- not block the window load event, because they are loading=lazy -->
- <iframe id="visible" loading="lazy"
- src=""
- <iframe id="visibility_hidden" style="visibility:hidden;" loading="lazy"
- src=""
-</body>
-
-<script>
- const visible_iframe = document.querySelector('#visible');
- const hidden_iframe = document.querySelector('#visibility_hidden');
-
- const visible_iframe_t =
- async_test('In-viewport loading=lazy iframe does not block the load event');
-
- const hidden_iframe_t =
- async_test('In-viewport loading=lazy visibility:hidden iframe does not ' +
- 'block the load event');
-
- let has_window_loaded = false;
- window.addEventListener("load", () => {
- has_window_loaded = true;
- });
-
- visible_iframe._onload_ = visible_iframe_t.step_func_done(() => {
- assert_true(has_window_loaded,
- "The visible iframe should not block the load event");
- });
-
- hidden_iframe._onload_ = hidden_iframe_t.step_func_done(() => {
- assert_true(has_window_loaded,
- "The hidden iframe should not block the load event");
- });
-</script>
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times-expected.txt (from rev 267691, trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times.tentative-expected.txt) (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,4 @@
+
+
+PASS Iframes with loading='lazy' can be lazy loaded multiple times
+
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times.html (from rev 267691, trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times.tentative.html) (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<head>
+ <title>Iframes with loading='lazy' can be lazy loaded multiple times</title>
+ <link rel="author" title="Dom Farolino" href=""
+ <link rel="help" href=""
+ <script src=""
+ <script src=""
+</head>
+
+<body>
+ <!-- This is used to represent the top of the viewport, so we can scroll the
+ below-viewport iframe out-of-view later in the test -->
+ <div id="top_div"></div>
+ <div style="height:1000vh;"></div>
+ <iframe id="below_viewport" loading="lazy" src=""
+
+<script>
+ const t = async_test();
+ const iframe = document.querySelector('#below_viewport');
+ const top_div = document.querySelector('#top_div');
+
+ let has_window_load_fired = false;
+ let iframe_being_unloaded = false;
+
+ // This should be triggered first.
+ window.addEventListener('load', t.step_func(() => {
+ has_window_load_fired = true;
+ // Scroll the loading=lazy below-viewport iframe into view, so that it loads.
+ iframe.scrollIntoView();
+ }));
+
+ window.addEventListener('message', t.step_func(msg => {
+ if (msg.data ="" 'unloading')
+ iframe_being_unloaded = true;
+ }));
+
+ iframe._onload_ = t.step_func(() => {
+ assert_true(has_window_load_fired,
+ "The loading=lazy below-viewport iframe should not block the " +
+ "window load event");
+ changeIframeSourceAndScrollToTop();
+ });
+
+ function changeIframeSourceAndScrollToTop() {
+ top_div.scrollIntoView();
+
+ // Lazily load a "different" iframe.
+ iframe.src = '';
+ iframe._onload_ =
+ t.unreached_func("The loading=lazy below-viewport iframe should lazily " +
+ "load its second resource, and not load it eagerly " +
+ "when the `src` attribute is changed");
+
+ // In 1s, scroll the iframe *back* into view, and record that it loads
+ // successfully.
+ t.step_timeout(() => {
+ assert_false(iframe_being_unloaded,
+ "The iframe's old resource is not eagerly unloaded");
+
+ iframe._onload_ = t.step_func_done(() => {
+ assert_true(iframe_being_unloaded,
+ "The iframe's old resources was unloaded correctly");
+ });
+
+ iframe.scrollIntoView();
+ }, 1000);
+ }
+</script>
+</body>
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times.tentative-expected.txt (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times.tentative-expected.txt 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times.tentative-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,4 +0,0 @@
-
-
-PASS Iframes with loading='lazy' can be lazy loaded multiple times
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times.tentative.html (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times.tentative.html 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times.tentative.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,69 +0,0 @@
-<!DOCTYPE html>
-<head>
- <title>Iframes with loading='lazy' can be lazy loaded multiple times</title>
- <link rel="author" title="Dom Farolino" href=""
- <link rel="help" href=""
- <script src=""
- <script src=""
-</head>
-
-<body>
- <!-- This is used to represent the top of the viewport, so we can scroll the
- below-viewport iframe out-of-view later in the test -->
- <div id="top_div"></div>
- <div style="height:1000vh;"></div>
- <iframe id="below_viewport" loading="lazy" src=""
-
-<script>
- const t = async_test();
- const iframe = document.querySelector('#below_viewport');
- const top_div = document.querySelector('#top_div');
-
- let has_window_load_fired = false;
- let iframe_being_unloaded = false;
-
- // This should be triggered first.
- window.addEventListener('load', t.step_func(() => {
- has_window_load_fired = true;
- // Scroll the loading=lazy below-viewport iframe into view, so that it loads.
- iframe.scrollIntoView();
- }));
-
- window.addEventListener('message', t.step_func(msg => {
- if (msg.data ="" 'unloading')
- iframe_being_unloaded = true;
- }));
-
- iframe._onload_ = t.step_func(() => {
- assert_true(has_window_load_fired,
- "The loading=lazy below-viewport iframe should not block the " +
- "window load event");
- changeIframeSourceAndScrollToTop();
- });
-
- function changeIframeSourceAndScrollToTop() {
- top_div.scrollIntoView();
-
- // Lazily load a "different" iframe.
- iframe.src = '';
- iframe._onload_ =
- t.unreached_func("The loading=lazy below-viewport iframe should lazily " +
- "load its second resource, and not load it eagerly " +
- "when the `src` attribute is changed");
-
- // In 1s, scroll the iframe *back* into view, and record that it loads
- // successfully.
- t.step_timeout(() => {
- assert_false(iframe_being_unloaded,
- "The iframe's old resource is not eagerly unloaded");
-
- iframe._onload_ = t.step_func_done(() => {
- assert_true(iframe_being_unloaded,
- "The iframe's old resources was unloaded correctly");
- });
-
- iframe.scrollIntoView();
- }, 1000);
- }
-</script>
-</body>
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub-expected.txt (from rev 267691, trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.tentative-expected.txt) (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,4 @@
+
+
+PASS Test that when a deferred iframe is fetched, it uses the `referrerpolicy` specified at parse-time
+
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.html (from rev 267691, trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.tentative.html) (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<head>
+ <title>Deferred loading=lazy iframes are fetched with the parse-time
+ `referrerpolicy` attribute</title>
+ <link rel="author" title="Dom Farolino" href=""
+ <link rel="author" title="Raj T" href=""
+ <link rel="help" href=""
+ <script src=""
+ <script src=""
+ <script src=""
+</head>
+
+<script>
+ const below_viewport_iframe = new ElementLoadPromise("below_viewport_iframe");
+
+ async_test(function(t) {
+ // Change the referrer-policy and scroll down to load the deferred elements.
+ window.addEventListener("load", t.step_func(() => {
+ below_viewport_iframe.element().referrerPolicy = "no-referrer";
+ below_viewport_iframe.element().scrollIntoView();
+ }));
+
+ below_viewport_iframe.promise.then(
+ t.step_func_done(function() {
+ // The `Referer` header should be the full URL, as specified by the
+ // iframe's `referrerpolicy` attribute at parse-time, and not the origin
+ // (as specified in meta referrer tag) or null (as overridden
+ // referrerpolicy=no-referrer after load deferral).
+ assert_true(below_viewport_iframe.element().contentDocument.body.innerHTML
+ .includes("Referer: http://{{location[host]}}{{location[path]}}"),
+ "The iframe's `Referer` should be the referrer's full URL");
+ }));
+ }, "Test that when a deferred iframe is fetched, it uses the " +
+ "`referrerpolicy` specified at parse-time");
+</script>
+
+<body>
+ <meta name="referrer" content="origin">
+ <div style="height:1000vh;"></div>
+ <iframe id="below_viewport_iframe" src=""
+ loading="lazy" width="200px" height="100px"
+ referrerpolicy="unsafe-url"
+ _onload_="below_viewport_iframe.resolve();">
+ </iframe>
+</body>
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.tentative-expected.txt (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.tentative-expected.txt 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.tentative-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,4 +0,0 @@
-
-
-PASS Test that when a deferred iframe is fetched, it uses the `referrerpolicy` specified at parse-time
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.tentative.html (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.tentative.html 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.tentative.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,45 +0,0 @@
-<!DOCTYPE html>
-<head>
- <title>Deferred loading=lazy iframes are fetched with the parse-time
- `referrerpolicy` attribute</title>
- <link rel="author" title="Dom Farolino" href=""
- <link rel="author" title="Raj T" href=""
- <link rel="help" href=""
- <script src=""
- <script src=""
- <script src=""
-</head>
-
-<script>
- const below_viewport_iframe = new ElementLoadPromise("below_viewport_iframe");
-
- async_test(function(t) {
- // Change the referrer-policy and scroll down to load the deferred elements.
- window.addEventListener("load", t.step_func(() => {
- below_viewport_iframe.element().referrerPolicy = "no-referrer";
- below_viewport_iframe.element().scrollIntoView();
- }));
-
- below_viewport_iframe.promise.then(
- t.step_func_done(function() {
- // The `Referer` header should be the full URL, as specified by the
- // iframe's `referrerpolicy` attribute at parse-time, and not the origin
- // (as specified in meta referrer tag) or null (as overridden
- // referrerpolicy=no-referrer after load deferral).
- assert_true(below_viewport_iframe.element().contentDocument.body.innerHTML
- .includes("Referer: http://{{location[host]}}{{location[path]}}"),
- "The iframe's `Referer` should be the referrer's full URL");
- }));
- }, "Test that when a deferred iframe is fetched, it uses the " +
- "`referrerpolicy` specified at parse-time");
-</script>
-
-<body>
- <meta name="referrer" content="origin">
- <div style="height:1000vh;"></div>
- <iframe id="below_viewport_iframe" src=""
- loading="lazy" width="200px" height="100px"
- referrerpolicy="unsafe-url"
- _onload_="below_viewport_iframe.resolve();">
- </iframe>
-</body>
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager-expected.txt (from rev 267691, trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager.tentative-expected.txt) (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,4 @@
+
+
+PASS Below-viewport iframes with loading='lazy' load when set to loading='eager' or the `loading` attribute is removed
+
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager.html (from rev 267691, trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager.tentative.html) (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<head>
+ <title>Below-viewport iframes with loading='lazy' load when set to
+ loading='eager' or the `loading` attribute is removed</title>
+ <link rel="author" title="Dom Farolino" href=""
+ <link rel="help" href=""
+ <script src=""
+ <script src=""
+</head>
+
+<script>
+ const t = async_test("Below-viewport iframes with loading='lazy' load when " +
+ "set to loading='eager' or the `loading` attribute is " +
+ "removed");
+
+ const iframe_1_onload = t.unreached_func("#iframe_1 should not load before " +
+ "the window load event");
+ const iframe_2_onload = t.unreached_func("#iframe_2 should not load before " +
+ "the window load event");
+
+ window.addEventListener("load", t.step_func(() => {
+ const iframe_1 = document.querySelector('#iframe_1');
+ const iframe_2 = document.querySelector('#iframe_2');
+
+ const iframe_1_promise = new Promise((resolve, reject) => {
+ iframe_1._onerror_ = reject;
+ iframe_1._onload_ = resolve;
+ });
+
+ const iframe_2_promise = new Promise((resolve, reject) => {
+ iframe_2._onerror_ = reject;
+ iframe_2._onload_ = resolve;
+ });
+
+ Promise.all([iframe_1_promise, iframe_2_promise])
+ .then(t.step_func_done())
+ .catch(t.unreached_func("The iframes should load successfully"));
+
+ // Kick off the requests.
+ iframe_1.loading = 'eager';
+ iframe_2.removeAttribute('loading'); // unset the attribute, putting it in
+ // the default (eager) state.
+ }));
+
+</script>
+
+<body>
+ <div style="height:1000vh;"></div>
+ <iframe id="iframe_1"
+ src=""
+ loading="lazy" _onload_="iframe_1_onload();"></iframe>
+ <iframe id="iframe_2"
+ src=""
+ loading="lazy" _onload_="iframe_2_onload();"></iframe>
+</body>
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager.tentative-expected.txt (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager.tentative-expected.txt 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager.tentative-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,4 +0,0 @@
-
-
-PASS Below-viewport iframes with loading='lazy' load when set to loading='eager' or the `loading` attribute is removed
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager.tentative.html (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager.tentative.html 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager.tentative.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,55 +0,0 @@
-<!DOCTYPE html>
-<head>
- <title>Below-viewport iframes with loading='lazy' load when set to
- loading='eager' or the `loading` attribute is removed</title>
- <link rel="author" title="Dom Farolino" href=""
- <link rel="help" href=""
- <script src=""
- <script src=""
-</head>
-
-<script>
- const t = async_test("Below-viewport iframes with loading='lazy' load when " +
- "set to loading='eager' or the `loading` attribute is " +
- "removed");
-
- const iframe_1_onload = t.unreached_func("#iframe_1 should not load before " +
- "the window load event");
- const iframe_2_onload = t.unreached_func("#iframe_2 should not load before " +
- "the window load event");
-
- window.addEventListener("load", t.step_func(() => {
- const iframe_1 = document.querySelector('#iframe_1');
- const iframe_2 = document.querySelector('#iframe_2');
-
- const iframe_1_promise = new Promise((resolve, reject) => {
- iframe_1._onerror_ = reject;
- iframe_1._onload_ = resolve;
- });
-
- const iframe_2_promise = new Promise((resolve, reject) => {
- iframe_2._onerror_ = reject;
- iframe_2._onload_ = resolve;
- });
-
- Promise.all([iframe_1_promise, iframe_2_promise])
- .then(t.step_func_done())
- .catch(t.unreached_func("The iframes should load successfully"));
-
- // Kick off the requests.
- iframe_1.loading = 'eager';
- iframe_2.removeAttribute('loading'); // unset the attribute, putting it in
- // the default (eager) state.
- }));
-
-</script>
-
-<body>
- <div style="height:1000vh;"></div>
- <iframe id="iframe_1"
- src=""
- loading="lazy" _onload_="iframe_1_onload();"></iframe>
- <iframe id="iframe_2"
- src=""
- loading="lazy" _onload_="iframe_2_onload();"></iframe>
-</body>
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.html (from rev 267691, trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative.html) (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+<head>
+ <title>Iframes with loading='lazy' load when in the viewport</title>
+ <link rel="author" title="Scott Little" href=""
+ <link rel="author" title="Dom Farolino" href=""
+ <link rel="help" href=""
+ <script src=""
+ <script src=""
+</head>
+
+<script>
+ const t_in_viewport =
+ async_test('In-viewport iframes load eagerly');
+ const t_below_viewport =
+ async_test('Below-viewport iframes load lazily');
+ const t_below_viewport_srcdoc =
+ async_test('Below-viewport srcdoc iframes load lazily');
+ const t_below_viewport_data_url =
+ async_test('Below-viewport data: url iframes load lazily');
+ const t_below_viewport_blob_url =
+ async_test('Below-viewport blob url iframes load lazily');
+
+
+ document.addEventListener('DOMContentLoaded', e => {
+ const blob_url_iframe = document.querySelector('#below_viewport_blob_url');
+ const blob = new Blob(['<p>Blob subframe</p>'], {type: 'text/html'});
+ const url = ""
+ blob_url_iframe.src = ""
+ });
+
+ let has_window_loaded = false;
+
+ const in_viewport_iframe_onload = t_in_viewport.step_func_done(() => {
+ assert_false(has_window_loaded,
+ "The in_viewport iframe should not block the load event");
+ });
+
+ window.addEventListener("load", () => {
+ has_window_loaded = true;
+ document.getElementById("below_viewport_srcdoc").scrollIntoView();
+ });
+
+ const below_viewport_iframe_onload = t_below_viewport.step_func_done(() => {
+ assert_true(has_window_loaded,
+ "The window load event should have fired before " +
+ "the below-viewport iframe loads");
+ });
+
+ // Onload handlers for below-viewport srcdoc iframe.
+ // Must make this accessible to the srcdoc iframe's body.
+ window.below_viewport_srcdoc_iframe_subresource_onload = t_below_viewport_srcdoc.step_func(() => {
+ assert_true(has_window_loaded,
+ "The window load event should have fired before " +
+ "the below-viewport srcdoc iframe's subresource loads");
+ });
+
+ const below_viewport_srcdoc_iframe_onload = t_below_viewport_srcdoc.step_func_done(() => {
+ assert_true(has_window_loaded,
+ "The window load event should have fired before " +
+ "the below-viewport srcdoc iframe loads");
+ });
+
+ // Onload handler for below-viewport data url iframe.
+ const below_viewport_data_url_iframe_onload = t_below_viewport_data_url.step_func_done(() => {
+ assert_true(has_window_loaded,
+ "The window load event should have fired before " +
+ "the below-viewport data url iframe loads");
+ });
+
+ // Onload handler for below-viewport blob url iframe.
+ const below_viewport_blob_url_iframe_onload = t_below_viewport_blob_url.step_func_done(() => {
+ assert_true(has_window_loaded,
+ "The window load event should have fired before " +
+ "the below-viewport blob url iframe loads");
+ });
+
+</script>
+
+<body>
+ <iframe id="in_viewport" src=""
+ loading="lazy" width="200px" height="100px"
+ _onload_="in_viewport_iframe_onload();"></iframe>
+
+ <div style="height:2000vh;"></div>
+ <iframe id="below_viewport" src=""
+ loading="lazy" width="200px" height="100px"
+ _onload_="below_viewport_iframe_onload();"></iframe>
+ <iframe id="below_viewport_srcdoc"
+ srcdoc="<body><img src=''
+ _onload_='parent.below_viewport_srcdoc_iframe_subresource_onload();'></body>"
+ loading="lazy" width="200px" height="100px"
+ _onload_="below_viewport_srcdoc_iframe_onload();"></iframe>
+ <iframe id="below_viewport_data_url"
+ src=""
+ loading="lazy" width="200px" height="100px"
+ _onload_="below_viewport_data_url_iframe_onload();"></iframe>
+ <!-- This iframe has its `src` set to a blob URL dynamically above -->
+ <iframe id="below_viewport_blob_url"
+ loading="lazy" width="200px" height="100px"
+ _onload_="below_viewport_blob_url_iframe_onload();"></iframe>
+
+
+
+ <!-- This async script loads very slowly in order to ensure that, if the
+ below_viewport* elements have started loading, it has a chance to finish
+ loading before window load event fires, so that the test will dependably
+ fail in that case instead of potentially passing depending on how long
+ different resource fetches take. -->
+ <script async src=""
+</body>
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative-expected.txt (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative-expected.txt 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,8 +0,0 @@
-
-
-
-PASS In-viewport iframes load eagerly
-PASS In-viewport srcdoc iframes load eagerly
-PASS Below-viewport iframes load lazily
-FAIL Below-viewport srcdoc iframes load lazily assert_true: The window load event should have fired before the below-viewport srcdoc iframe loads expected true got false
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative.html (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative.html 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,84 +0,0 @@
-<!DOCTYPE html>
-<head>
- <title>Iframes with loading='lazy' load when in the viewport</title>
- <link rel="author" title="Scott Little" href=""
- <link rel="author" title="Dom Farolino" href=""
- <link rel="help" href=""
- <script src=""
- <script src=""
-</head>
-
-<script>
- const t_in_viewport =
- async_test('In-viewport iframes load eagerly');
- const t_in_viewport_srcdoc=
- async_test('In-viewport srcdoc iframes load eagerly');
- const t_below_viewport =
- async_test('Below-viewport iframes load lazily');
- const t_below_viewport_srcdoc =
- async_test('Below-viewport srcdoc iframes load lazily');
-
- let has_window_loaded = false;
-
- const in_viewport_iframe_onload = t_in_viewport.step_func_done(() => {
- assert_false(has_window_loaded,
- "The in_viewport iframe should not block the load event");
- });
-
- const in_viewport_srcdoc_iframe_onload = t_in_viewport_srcdoc.step_func_done(() => {
- assert_false(has_window_loaded,
- "The in_viewport srcdoc iframe should not block the load event");
- });
-
- window.addEventListener("load", () => {
- has_window_loaded = true;
- document.getElementById("below_viewport_srcdoc").scrollIntoView();
- });
-
- const below_viewport_iframe_onload = t_below_viewport.step_func_done(() => {
- assert_true(has_window_loaded,
- "The window load event should have fired before " +
- "the below-viewport iframe loads");
- });
-
- // Must make this accessible to the srcdoc iframe's body.
- window.below_viewport_srcdoc_iframe_subresource_onload = t_below_viewport_srcdoc.step_func(() => {
- assert_true(has_window_loaded,
- "The window load event should have fired before " +
- "the below-viewport srcdoc iframe's subresource loads");
- });
-
- const below_viewport_srcdoc_iframe_onload = t_below_viewport_srcdoc.step_func_done(() => {
- assert_true(has_window_loaded,
- "The window load event should have fired before " +
- "the below-viewport srcdoc iframe loads");
- });
-</script>
-
-<body>
- <iframe id="in_viewport" src=""
- loading="lazy" width="200px" height="100px"
- _onload_="in_viewport_iframe_onload();"></iframe>
- <iframe id="in_viewport_srcdoc"
- srcdoc="<body><img src=''></body>"
- loading="lazy" width="200px" height="100px"
- _onload_="in_viewport_srcdoc_iframe_onload();"></iframe>
-
- <div style="height:2000vh;"></div>
- <iframe id="below_viewport" src=""
- loading="lazy" width="200px" height="100px"
- _onload_="below_viewport_iframe_onload();"></iframe>
- <iframe id="below_viewport_srcdoc"
- srcdoc="<body><img src=''
- _onload_='parent.below_viewport_srcdoc_iframe_subresource_onload();'></body>"
- loading="lazy" width="200px" height="100px"
- _onload_="below_viewport_srcdoc_iframe_onload();"></iframe>
-
-
- <!-- This async script loads very slowly in order to ensure that, if the
- below_viewport* elements have started loading, it has a chance to finish
- loading before window load event fires, so that the test will dependably
- fail in that case instead of potentially passing depending on how long
- different resource fetches take. -->
- <script async src=""
-</body>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-network-error.sub-expected.txt (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-network-error.sub-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-network-error.sub-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,9 @@
+Blocked access to external URL http://nonexistent.localhost/
+Blocked access to external URL http://nonexistent.localhost/
+
+
+PASS new iframe: nonexistent host
+PASS new iframe: X-Frame-Options prevents embedding
+PASS navigating an existing iframe: nonexistent host
+PASS navigating an existing iframe: X-Frame-Options prevents embedding
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-network-error.sub.html (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-network-error.sub.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-network-error.sub.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Network errors with iframe elements</title>
+<script src=""
+<script src=""
+
+<body>
+<script>
+"use strict";
+
+async_test(t => {
+ const iframe = document.createElement("iframe");
+ iframe.src = ""
+ iframe._onload_ = () => t.done();
+ iframe._onerror_ = t.unreached_func("error event must not fire");
+ document.body.append(iframe);
+}, "new iframe: nonexistent host");
+
+async_test(t => {
+ const iframe = document.createElement("iframe");
+ iframe.src = ""
+ iframe._onload_ = () => t.done();
+ iframe._onerror_ = t.unreached_func("error event must not fire");
+ document.body.append(iframe);
+}, "new iframe: X-Frame-Options prevents embedding");
+
+async_test(t => {
+ const iframe = document.createElement("iframe");
+ iframe.src = ""
+ iframe.name = "existingIframe1";
+ iframe._onload_ = t.step_func(() => {
+ iframe._onload_ = () => t.done();
+ iframe._onerror_ = t.unreached_func("error event must not fire 2");
+
+ frames.existingIframe1.location.href = ""
+ });
+ iframe._onerror_ = t.unreached_func("error event must not fire 1");
+ document.body.append(iframe);
+}, "navigating an existing iframe: nonexistent host");
+
+async_test(t => {
+ const iframe = document.createElement("iframe");
+ iframe.src = ""
+ iframe.name = "existingIframe2";
+ iframe._onload_ = t.step_func(() => {
+ iframe._onload_ = () => t.done();
+ iframe._onerror_ = t.unreached_func("error event must not fire 2");
+
+ frames.existingIframe2.location.href = ""
+ });
+ iframe._onerror_ = t.unreached_func("error event must not fire 1");
+ document.body.append(iframe);
+}, "navigating an existing iframe: X-Frame-Options prevents embedding");
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_anchor_download_block_downloads.sub.tentative-expected.txt (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_anchor_download_block_downloads.sub.tentative-expected.txt 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_anchor_download_block_downloads.sub.tentative-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,4 +1,5 @@
-FAIL <a download> triggered download in sandbox is blocked. assert_equals: Expect no download to happen, but got one. expected "TOKEN_NOT_SET" but got "TOKEN_SET"
+PASS <a download> triggered download in sandbox is blocked.
+FAIL <a download> triggered download in sandbox is blocked before a request is made assert_equals: Expect no download to happen, but got one. expected "TOKEN_NOT_SET" but got "TOKEN_SET"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_anchor_download_block_downloads.sub.tentative.html (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_anchor_download_block_downloads.sub.tentative.html 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_anchor_download_block_downloads.sub.tentative.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -19,13 +19,32 @@
iframe.contentWindow.addEventListener(
"unload", t.unreached_func("Unexpected navigation."));
var anchor = iframe.contentDocument.getElementsByTagName('a')[0];
- anchor.href = "" + token;
+ anchor.href = "" + token + "&finish-delay=" + StreamDownloadFinishDelay();
anchor.download = null;
anchor.click();
+ AssertDownloadFailure(t, token, StreamDownloadFinishDelay() + DownloadVerifyDelay());
+ });
+
+ document.body.appendChild(iframe);
+}, "<a download> triggered download in sandbox is blocked.");
+
+async_test(t => {
+ const token = "{{$id:uuid()}}";
+ var iframe = document.createElement("iframe");
+ iframe.srcdoc = "<a>Download</a>";
+ iframe.sandbox = "allow-same-origin";
+ iframe._onload_ = t.step_func(function () {
+ iframe.contentWindow.addEventListener(
+ "unload", t.unreached_func("Unexpected navigation."));
+ var anchor = iframe.contentDocument.getElementsByTagName('a')[0];
+ anchor.href = "" + token ;
+ anchor.download = null;
+ anchor.click();
AssertDownloadFailure(t, token, DownloadVerifyDelay());
});
document.body.appendChild(iframe);
-}, "<a download> triggered download in sandbox is blocked.");
+}, "<a download> triggered download in sandbox is blocked before a request is made");
+
</script>
</body>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_allow_downloads.sub.tentative-expected.txt (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_allow_downloads.sub.tentative-expected.txt 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_allow_downloads.sub.tentative-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,6 +1,10 @@
CONSOLE MESSAGE: Error while parsing the 'sandbox' attribute: 'allow-downloads' is an invalid sandbox flag.
+CONSOLE MESSAGE: Error while parsing the 'sandbox' attribute: 'allow-downloads' is an invalid sandbox flag.
CONSOLE MESSAGE: Blocked script execution in 'about:srcdoc' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
+Harness Error (TIMEOUT), message = null
+
FAIL Navigation resulted download in sandbox is allowed by allow-downloads. Sandbox access violation: Blocked a frame at "http://localhost:8800" from accessing a cross-origin frame. The frame being accessed is sandboxed and lacks the "allow-same-origin" flag.
+TIMEOUT Navigation resulted download in sandbox from <object> is allowed by allow-downloads. Test timed out
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_allow_downloads.sub.tentative.html (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_allow_downloads.sub.tentative.html 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_allow_downloads.sub.tentative.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -30,5 +30,23 @@
document.body.appendChild(iframe);
}, "Navigation resulted download in sandbox is allowed by allow-downloads.");
+
+async_test(t => {
+ const token = "{{$id:uuid()}}";
+ var iframe = document.createElement("iframe");
+
+ const folder = location.origin+"/html/semantics/embedded-content/the-iframe-element/";
+ const href = "" }`;
+ const objectDoc =`<a href=""
+ <${"script"}> document.querySelector("a").click(); </${"script"}>`;
+
+ iframe.srcdoc = `<object data=''></object>`;
+ iframe.sandbox = "allow-same-origin allow-scripts allow-downloads";
+ iframe.addEventListener("load",()=>{
+ AssertDownloadSuccess(t, token, StreamDownloadFinishDelay() + DownloadVerifyDelay());
+ })
+ document.body.appendChild(iframe);
+}, "Navigation resulted download in sandbox from <object> is allowed by allow-downloads.");
+
</script>
</body>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_block_downloads.sub.tentative-expected.txt (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_block_downloads.sub.tentative-expected.txt 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_block_downloads.sub.tentative-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -2,4 +2,5 @@
FAIL Navigation resulted download in sandbox is blocked. Sandbox access violation: Blocked a frame at "http://localhost:8800" from accessing a cross-origin frame. The frame being accessed is sandboxed and lacks the "allow-same-origin" flag.
+PASS Navigation resulted download in sandbox from <object> is blocked.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_block_downloads.sub.tentative.html (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_block_downloads.sub.tentative.html 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_block_downloads.sub.tentative.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -29,5 +29,24 @@
document.body.appendChild(iframe);
}, "Navigation resulted download in sandbox is blocked.");
+
+
+async_test(t => {
+ const token = "{{$id:uuid()}}";
+ var iframe = document.createElement("iframe");
+
+ const folder = location.origin+"/html/semantics/embedded-content/the-iframe-element/";
+ const href = "" }`;
+ const objectDoc =`<a href=""
+ <${"script"}> document.querySelector("a").click(); </${"script"}>`;
+
+ iframe.srcdoc = `<object data=''></object>`;
+ iframe.sandbox = "allow-same-origin allow-scripts";
+ iframe.addEventListener("load",()=>{
+ AssertDownloadFailure(t, token, StreamDownloadFinishDelay() + DownloadVerifyDelay());
+ })
+ document.body.appendChild(iframe);
+}, "Navigation resulted download in sandbox from <object> is blocked.");
+
</script>
</body>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/sandbox-toggle-in-inactive-document-crash.html (0 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/sandbox-toggle-in-inactive-document-crash.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/sandbox-toggle-in-inactive-document-crash.html 2020-09-28 06:36:34 UTC (rev 267692)
@@ -0,0 +1,9 @@
+<body>
+<iframe id="i"></iframe>
+<script>
+var saved_i = i;
+var saved_i_doc = i.contentDocument;
+i.remove();
+saved_i_doc.adoptNode(saved_i);
+saved_i.sandbox.toggle("1");
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/download_stash.py (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/download_stash.py 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/download_stash.py 2020-09-28 06:36:34 UTC (rev 267692)
@@ -22,7 +22,6 @@
single_delay = finish_delay / count
for i in range(count): # pylint: disable=unused-variable
time.sleep(single_delay)
- response.writer.write_content(u"\n")
- if not response.writer.flush():
+ if not response.writer.write_content(b"\n"):
return
request.server.stash.put(token, True)
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log (267691 => 267692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log 2020-09-28 06:36:34 UTC (rev 267692)
@@ -29,16 +29,17 @@
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-allowfullscreen.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-append-to-child-document.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-load-event.html
-/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.tentative.html
-/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative.html
-/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative.html
-/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.tentative.html
-/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times.tentative.html
-/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.tentative.html
-/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager.tentative.html
-/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-modify-scrolling-attr-to-yes-expected.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-modify-scrolling-attr-to-yes.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-network-error.sub.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-nosrc.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-synchronously-discard.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-with-base-expected.html
@@ -84,6 +85,7 @@
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/same_origin_grandchild.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/same_origin_parentage.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/sandbox-ascii-case-insensitive.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/sandbox-toggle-in-inactive-document-crash.html
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/sandbox_001.htm
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/sandbox_002.htm
/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/sandbox_005.htm
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (267691 => 267692)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2020-09-28 06:36:34 UTC (rev 267692)
@@ -191,13 +191,13 @@
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/not-rendered-image-loading-lazy.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/picture-loading-lazy.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/remove-element-and-scroll.html [ Skip ]
-imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative.html [ Skip ]
-imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative.html [ Skip ]
-imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.tentative.html [ Skip ]
-imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times.tentative.html [ Skip ]
-imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.tentative.html [ Skip ]
-imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager.tentative.html [ Skip ]
-imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative.html [ Skip ]
+imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.html [ Skip ]
+imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.html [ Skip ]
+imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.html [ Skip ]
+imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-multiple-times.html [ Skip ]
+imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.html [ Skip ]
+imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-to-eager.html [ Skip ]
+imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.html [ Skip ]
# testRunner.queueLoad() does not support loading data URLs in Mac WK1
http/tests/security/contentSecurityPolicy/navigate-self-to-data-url.html [ Skip ]
Modified: trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_anchor_download_block_downloads.sub.tentative-expected.txt (267691 => 267692)
--- trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_anchor_download_block_downloads.sub.tentative-expected.txt 2020-09-28 04:39:28 UTC (rev 267691)
+++ trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_anchor_download_block_downloads.sub.tentative-expected.txt 2020-09-28 06:36:34 UTC (rev 267692)
@@ -1,5 +1,7 @@
CONSOLE MESSAGE: Blocked script execution in 'about:srcdoc' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
+CONSOLE MESSAGE: Blocked script execution in 'about:srcdoc' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
-FAIL <a download> triggered download in sandbox is blocked. undefined is not an object (evaluating 'anchor.href = "" + token')
+FAIL <a download> triggered download in sandbox is blocked. Sandbox access violation: Blocked a frame at "http://localhost:8800" from accessing a cross-origin frame. The frame being accessed is sandboxed and lacks the "allow-same-origin" flag.
+FAIL <a download> triggered download in sandbox is blocked before a request is made undefined is not an object (evaluating 'anchor.href = "" + token')