Diff
Modified: trunk/LayoutTests/ChangeLog (258064 => 258065)
--- trunk/LayoutTests/ChangeLog 2020-03-07 06:58:10 UTC (rev 258064)
+++ trunk/LayoutTests/ChangeLog 2020-03-07 07:39:17 UTC (rev 258065)
@@ -1,3 +1,15 @@
+2020-03-06 Rob Buis <rb...@igalia.com>
+
+ Fix original-crossorigin-applied.sub.html WPT test
+ https://bugs.webkit.org/show_bug.cgi?id=208119
+
+ Reviewed by Darin Adler.
+
+ Skip test on mac-wk1 and win.
+
+ * platform/mac-wk1/TestExpectations:
+ * platform/win/TestExpectations:
+
2020-03-06 Lauro Moura <lmo...@igalia.com>
[WPE] Garden some crashes and update expectation
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (258064 => 258065)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2020-03-07 06:58:10 UTC (rev 258064)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2020-03-07 07:39:17 UTC (rev 258065)
@@ -1,3 +1,20 @@
+2020-03-06 Rob Buis <rb...@igalia.com>
+
+ Fix original-crossorigin-applied.sub.html WPT test
+ https://bugs.webkit.org/show_bug.cgi?id=208119
+
+ Reviewed by Darin Adler.
+
+ Rename original-crossorigin-applied.sub.html to
+ image-loading-lazy-crossorigin-change.sub.html and change the
+ test to expect the latest rather than the original crossorigin
+ attribute value since crossorigin is a relevant mutation.
+
+ * web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-crossorigin-change.sub-expected.txt: Added.
+ * web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-crossorigin-change.sub.html: Added.
+ * web-platform-tests/html/semantics/embedded-content/the-img-element/original-crossorigin-applied.sub-expected.txt: Removed.
+ * web-platform-tests/html/semantics/embedded-content/the-img-element/original-crossorigin-applied.sub.html: Removed.
+
2020-03-06 Frederic Wang <fw...@igalia.com>
[intersection-observer] Accept a Document as an explicit root
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-crossorigin-change.sub-expected.txt (0 => 258065)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-crossorigin-change.sub-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-crossorigin-change.sub-expected.txt 2020-03-07 07:39:17 UTC (rev 258065)
@@ -0,0 +1,6 @@
+CONSOLE MESSAGE: Origin http://localhost:8800 is not allowed by Access-Control-Allow-Origin.
+CONSOLE MESSAGE: Cannot load image http://127.0.0.1:8800/html/semantics/embedded-content/the-img-element/resources/image.png due to access control checks.
+
+
+PASS Test that when deferred image is loaded, it uses the latest crossorigin attribute.
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-crossorigin-change.sub.html (0 => 258065)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-crossorigin-change.sub.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-crossorigin-change.sub.html 2020-03-07 07:39:17 UTC (rev 258065)
@@ -0,0 +1,30 @@
+<!DOCTYPE html><!-- webkit-test-runner [ experimental:enableLazyImageLoading=true ] -->
+<head>
+ <title>Deferred images with loading='lazy' use the latest crossorigin attribute</title>
+ <link rel="author" title="Raj T" href=""
+ <link rel="author" title="Rob Buis" href=""
+ <script src=""
+ <script src=""
+ <script src=""
+</head>
+
+<script>
+ const crossorigin_img = new ElementLoadPromise("crossorigin_img");
+
+ // Set the crossorigin attribute and scroll down to load the deferred image.
+ window.addEventListener("load", () => {
+ crossorigin_img.element().crossOrigin = 'anonymous';
+ crossorigin_img.element().scrollIntoView();
+ });
+
+ async_test(function(t) {
+ crossorigin_img.promise.then(t.unreached_func("The image should not load.")).catch(t.step_func_done());
+ }, "Test that when deferred image is loaded, it uses the latest crossorigin attribute.");
+</script>
+
+<body>
+ <div style="height:1000vh;"></div>
+ <img id="crossorigin_img" loading="lazy"
+ src=''
+ _onload_="crossorigin_img.resolve();" _onerror_="crossorigin_img.reject();">
+</body>
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/original-crossorigin-applied.sub-expected.txt (258064 => 258065)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/original-crossorigin-applied.sub-expected.txt 2020-03-07 06:58:10 UTC (rev 258064)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/original-crossorigin-applied.sub-expected.txt 2020-03-07 07:39:17 UTC (rev 258065)
@@ -1,5 +0,0 @@
-Blocked access to external URL http://www.127.0.0.1:8800/html/semantics/embedded-content/the-img-element/resources/image.png
-
-
-FAIL Test that when deferred image is loaded, it uses the crossorigin attribute specified at parse time. assert_unreached: The image load should not fail, trying to load with CORS headers set. Reached unreachable code
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/original-crossorigin-applied.sub.html (258064 => 258065)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/original-crossorigin-applied.sub.html 2020-03-07 06:58:10 UTC (rev 258064)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/original-crossorigin-applied.sub.html 2020-03-07 07:39:17 UTC (rev 258065)
@@ -1,42 +0,0 @@
-<!DOCTYPE html><!-- webkit-test-runner [ experimental:enableLazyImageLoading=true ] -->
-<head>
- <title>Deferred images with loading='lazy' use the original crossorigin attribute specified at the parse time</title>
- <link rel="author" title="Raj T" href=""
- <script src=""
- <script src=""
- <script src=""
-</head>
-
-<script>
- const crossorigin_img = new ElementLoadPromise("crossorigin_img");
-
- // Set the crossorigin and scroll down to load the deferred image.
- window.addEventListener("load", () => {
- crossorigin_img.element().crossOrigin = 'anonymous';
- crossorigin_img.element().scrollIntoView();
- });
-
- async_test(function(t) {
- crossorigin_img.promise.then(t.step_func_done(() => {
- // The image originally did not had crossOrigin property set, so CORS will
- // not be involved in fetching that. So drawing the image in a canvas will
- // make it tainted. Verify that the image did not load with CORS headers
- // due to the updated crossOrigin property.
- const img_element = crossorigin_img.element();
- const canvas = document.createElement('canvas');
- const context = canvas.getContext('2d');
- canvas.width = img_element.width;
- canvas.height = img_element.height;
- context.drawImage(img_element, 0, 0);
- assert_throws_dom('SecurityError', () => canvas.toDataURL());
- })
- ).catch(t.unreached_func("The image load should not fail, trying to load with CORS headers set."));
- }, "Test that when deferred image is loaded, it uses the crossorigin attribute specified at parse time.");
-</script>
-
-<body>
- <div style="height:10000px;"></div>
- <img id="crossorigin_img" loading="lazy"
- src=''
- _onload_="crossorigin_img.resolve();" _onerror_="crossorigin_img.reject();">
-</body>
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (258064 => 258065)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2020-03-07 06:58:10 UTC (rev 258064)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2020-03-07 07:39:17 UTC (rev 258065)
@@ -173,12 +173,12 @@
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-move-document.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-move-into-script-disabled-iframe.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy.html [ Skip ]
+imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-crossorigin-change.sub.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/move-element-and-scroll.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/not-rendered-below-viewport-image-loading-lazy.html [ Skip ]
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/original-base-url-applied-2.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/original-base-url-applied.html [ Skip ]
-imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/original-crossorigin-applied.sub.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/original-referrer-policy-applied.sub.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 ]
Modified: trunk/LayoutTests/platform/win/TestExpectations (258064 => 258065)
--- trunk/LayoutTests/platform/win/TestExpectations 2020-03-07 06:58:10 UTC (rev 258064)
+++ trunk/LayoutTests/platform/win/TestExpectations 2020-03-07 07:39:17 UTC (rev 258065)
@@ -4576,12 +4576,12 @@
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-move-document.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-move-into-script-disabled-iframe.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy.html [ Skip ]
+imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-crossorigin-change.sub.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/move-element-and-scroll.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/not-rendered-below-viewport-image-loading-lazy.html [ Skip ]
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/original-base-url-applied-2.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/original-base-url-applied.html [ Skip ]
-imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/original-crossorigin-applied.sub.html [ Skip ]
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/original-referrer-policy-applied.sub.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 ]