WebKit Bugzilla
Attachment 362280 Details for
Bug 194770
: Update WPT tests for embedded content
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch (applies on top of 362274)
0001-Update-WPT-tests-for-embedded-content.patch (text/plain), 205.78 KB, created by
Frédéric Wang (:fredw)
on 2019-02-18 02:39:36 PST
(
hide
)
Description:
Patch (applies on top of 362274)
Filename:
MIME Type:
Creator:
Frédéric Wang (:fredw)
Created:
2019-02-18 02:39:36 PST
Size:
205.78 KB
patch
obsolete
>From c3db067f0e4dbf5078f25cf65a5253a6dc054e14 Mon Sep 17 00:00:00 2001 >From: Frederic Wang <fwang@igalia.com> >Date: Mon, 18 Feb 2019 11:35:42 +0100 >Subject: [PATCH xserver] Update WPT tests for embedded content > >--- > LayoutTests/TestExpectations | 1 - > .../w3c/resources/import-expectations.json | 1 + > .../w3c/resources/resource-files.json | 1 + > .../html/semantics/embedded-content/META.yml | 3 + > .../hash-name-reference.html | 45 ++ > .../image-map-processing-model/w3c-import.log | 17 + > .../image-maps/w3c-import.log | 2 +- > .../embedded-content/resources/w3c-import.log | 2 +- > ...nsicsize-svg-image.tentative-expected.html | 22 + > .../intrinsicsize-svg-image.tentative.html | 24 + > .../svg/intrinsicsize/w3c-import.log | 18 + > .../the-area-element/resources/w3c-import.log | 17 + > .../the-area-element/support/w3c-import.log | 2 +- > .../the-area-element/w3c-import.log | 2 +- > .../the-audio-element/w3c-import.log | 2 +- > .../size.attributes.parse.whitespace.html | 6 +- > .../the-canvas-element/w3c-import.log | 3 +- > ...-getters-return-null-for-cross-origin.html | 14 + > .../embed-represent-nothing-04-expected.html | 7 + > .../embed-represent-nothing-04.html | 20 + > .../the-embed-element/w3c-import.log | 5 +- > ...-getters-return-null-for-cross-origin.html | 13 + > .../the-frame-element/w3c-import.log | 17 + > ...ument_changes_only_after_load_matures.html | 15 +- > ...e.html => cross_origin_parentage.sub.html} | 2 +- > ...-getters-return-null-for-cross-origin.html | 17 + > .../the-iframe-element/iframe-allow.html | 66 +++ > .../iframe-allowfullscreen.html | 56 ++- > .../the-iframe-element/iframe-nosrc.html | 26 ++ > .../iframe_javascript_url_01.htm | 12 +- > .../the-iframe-element/iframe_remove_src.html | 40 ++ > ...iframe_sandbox_allow_top_navigation-1.html | 28 +- > ...iframe_sandbox_allow_top_navigation-2.html | 29 +- > ...iframe_sandbox_allow_top_navigation-3.html | 28 +- > .../src-repeated-in-ancestor.html | 138 ++++++ > .../iframe-that-checks-contentDocument.html | 3 + > .../support/load-into-the-iframe.html | 19 + > .../the-iframe-element/support/w3c-import.log | 4 +- > .../the-iframe-element/w3c-import.log | 9 +- > .../404-response-with-actual-image-data.html | 18 + > .../404-response-with-actual-image-data.py | 3 + > .../the-img-element/Image-constructor.html | 5 + > .../available-images-expected.html | 2 + > .../available-images-onload.html | 33 ++ > .../the-img-element/available-images.html | 17 + > .../current-pixel-density/w3c-import.log | 2 +- > .../decode/image-decode-iframe.html | 54 +++ > ...age-decode-path-changes-svg.tentative.html | 82 ++++ > .../decode/image-decode-path-changes.html | 121 +++++ > .../decode/image-decode-picture.html | 133 ++++++ > .../decode/image-decode-svg.tentative.html | 128 ++++++ > ...ecode-with-quick-attach-svg.tentative.html | 23 + > .../image-decode-with-quick-attach.html | 26 ++ > .../the-img-element/decode/image-decode.html | 138 ++++++ > .../the-img-element/decode/w3c-import.log | 24 + > .../environment-changes/viewport-change.html | 2 +- > .../environment-changes/w3c-import.log | 2 +- > .../the-img-element/img.complete.html | 26 +- > ...size-with-responsive-images.tentative.html | 96 ++++ > ...out-unsized-media.tentative.https.sub.html | 66 +++ > ...zed-media.tentative.https.sub.html.headers | 1 + > .../intrinsicsize/w3c-import.log | 19 + > .../the-img-element/invalid-src.html | 4 +- > .../the-img-element/ismap/w3c-import.log | 2 +- > .../the-img-element/null-image-source.html | 30 ++ > .../the-img-element/relevant-mutations.html | 416 ++++++++++++++++++ > .../the-img-element/resources/w3c-import.log | 2 +- > .../parse-a-sizes-attribute-display-none.html | 7 + > .../parse-a-sizes-attribute-quirks-mode.html | 7 + > ...arse-a-sizes-attribute-standards-mode.html | 7 + > .../parse-a-sizes-attribute-width-1000px.html | 7 + > .../sizes/parse-a-sizes-attribute.html | 42 -- > .../sizes/sizes-dynamic-001-expected.html | 4 + > .../sizes/sizes-dynamic-001.html | 20 + > .../sizes/sizes-dynamic-002-expected.html | 4 + > .../sizes/sizes-dynamic-002.html | 33 ++ > .../sizes/support/parse-a-sizes-attribute.js | 29 ++ > .../{ => support}/sizes-iframed.sub.html | 11 + > .../sizes/support/w3c-import.log | 18 + > .../the-img-element/sizes/w3c-import.log | 12 +- > .../srcset/srcset-media-dynamic.html | 25 ++ > .../the-img-element/srcset/w3c-import.log | 3 +- > .../fail-to-resolve.html | 25 ++ > .../update-the-image-data/w3c-import.log | 17 + > .../the-img-element/w3c-import.log | 9 +- > ...-getters-return-null-for-cross-origin.html | 17 + > .../the-object-element/object-events.html | 80 ++++ > ...ck-failed-cross-origin-navigation.sub.html | 52 +++ > .../object-setcustomvalidity.html | 17 + > .../the-object-element/w3c-import.log | 6 +- > .../the-video-element/intrinsic_sizes.htm | 75 ++++ > ...out-unsized-media.tentative.https.sub.html | 39 ++ > ...zed-media.tentative.https.sub.html.headers | 1 + > .../intrinsicsize/w3c-import.log | 18 + > .../the-video-element/w3c-import.log | 3 +- > .../semantics/embedded-content/w3c-import.log | 17 + > LayoutTests/platform/mac-wk1/TestExpectations | 2 - > LayoutTests/tests-options.json | 15 + > 98 files changed, 2684 insertions(+), 149 deletions(-) > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/META.yml > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/image-maps/image-map-processing-model/w3c-import.log > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/svg/intrinsicsize/intrinsicsize-svg-image.tentative-expected.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/svg/intrinsicsize/intrinsicsize-svg-image.tentative.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/svg/intrinsicsize/w3c-import.log > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-area-element/resources/w3c-import.log > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/document-getters-return-null-for-cross-origin.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04-expected.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-frame-element/document-getters-return-null-for-cross-origin.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-frame-element/w3c-import.log > rename LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/{cross_origin_parentage.html => cross_origin_parentage.sub.html} (80%) > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/document-getters-return-null-for-cross-origin.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-allow.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-nosrc.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_remove_src.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/src-repeated-in-ancestor.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-checks-contentDocument.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/load-into-the-iframe.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/404-response-with-actual-image-data.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/404-response-with-actual-image-data.py > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/available-images-expected.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/available-images-onload.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/available-images.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-iframe.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes-svg.tentative.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-picture.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-svg.tentative.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach-svg.tentative.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/w3c-import.log > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/intrinsicsize-with-responsive-images.tentative.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html.headers > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/w3c-import.log > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/null-image-source.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-display-none.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-quirks-mode.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-standards-mode.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-width-1000px.html > delete mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-001-expected.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-001.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-002-expected.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-002.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/support/parse-a-sizes-attribute.js > rename LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/{ => support}/sizes-iframed.sub.html (93%) > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/support/w3c-import.log > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/srcset-media-dynamic.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-image-data/fail-to-resolve.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-image-data/w3c-import.log > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/document-getters-return-null-for-cross-origin.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-events.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-fallback-failed-cross-origin-navigation.sub.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-setcustomvalidity.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsic_sizes.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html.headers > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsicsize/w3c-import.log > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/w3c-import.log > >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index c2c19fb1153..32b77fb83b7 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -1035,7 +1035,6 @@ imported/w3c/web-platform-tests/html/dom/elements/global-attributes/dir_auto-tex > > imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/010.html [ Failure Timeout ] > imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html [ Failure ] >-imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html [ Pass Failure ] > > # Imported Mozilla SVG tests > webkit.org/b/5968 imported/mozilla/svg/linearGradient-basic-03.svg [ ImageOnlyFailure ] >diff --git a/LayoutTests/imported/w3c/resources/import-expectations.json b/LayoutTests/imported/w3c/resources/import-expectations.json >index 632766a79e9..4232bd4b060 100644 >--- a/LayoutTests/imported/w3c/resources/import-expectations.json >+++ b/LayoutTests/imported/w3c/resources/import-expectations.json >@@ -195,6 +195,7 @@ > "web-platform-tests/html/rendering": "skip", > "web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives": "skip", > "web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh": "import", >+ "web-platform-tests/html/semantics/embedded-content": "import", > "web-platform-tests/html/semantics/embedded-content-0": "skip", > "web-platform-tests/html/semantics/embedded-content/image-maps/image-map-processing-model": "skip", > "web-platform-tests/html/semantics/embedded-content/media-elements": "import", >diff --git a/LayoutTests/imported/w3c/resources/resource-files.json b/LayoutTests/imported/w3c/resources/resource-files.json >index 921f274169a..3603fafb09a 100644 >--- a/LayoutTests/imported/w3c/resources/resource-files.json >+++ b/LayoutTests/imported/w3c/resources/resource-files.json >@@ -1012,6 +1012,7 @@ > "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/support/blank.htm", >+ "web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-checks-contentDocument.html", > "web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-opens-modals.html", > "web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-on-popup.html", > "web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-without-user-gesture-failed.html", >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/META.yml b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/META.yml >new file mode 100644 >index 00000000000..199c4c412fe >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/META.yml >@@ -0,0 +1,3 @@ >+suggested_reviewers: >+ - foolip >+ - zcorpan >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html >new file mode 100644 >index 00000000000..e1ce253c32d >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html >@@ -0,0 +1,45 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>parsing a hash-name reference for img and object</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<style> >+ body { margin-top: 0 } >+ iframe { height: 600px; width:50px; border-top: none } >+</style> >+ >+<div id="log"></div> >+ >+<iframe data-name="HTML (standards)" src="hash-name-reference-test-data.html?pipe=sub&doctype=html"></iframe> >+<iframe data-name="HTML (quirks)" src="hash-name-reference-test-data.html?pipe=sub&doctype=quirks"></iframe> >+<iframe data-name="XHTML" src="hash-name-reference-test-data.html?pipe=sub|header(Content-Type, application/xhtml%2Bxml)&doctype=html"></iframe> >+ >+<script> >+setup({explicit_done: true}); >+ >+onload = function() { >+ var iframes = document.querySelectorAll('iframe'); >+ iframes.forEach(function(iframe) { >+ var iframeName = iframe.getAttribute('data-name'); >+ var doc = iframe.contentDocument; >+ var divs = doc.querySelectorAll('div[data-expect]'); >+ var div, img, object; >+ for (var i = 0; i < divs.length; ++i) { >+ div = divs[i]; >+ img = div.querySelector('img'); >+ object = div.querySelector('object'); >+ [img, object].forEach(function(elm) { >+ test(function(t) { >+ var expected = div.getAttribute('data-expect'); >+ var expected_elm = expected === 'no match' ? elm : div.querySelector('area[href="#' + expected + '"]'); >+ var got_elm = doc.elementFromPoint(elm.offsetLeft, elm.offsetTop); >+ assert_not_equals(expected_elm, null, 'sanity check (data-expect value wrong?)'); >+ assert_not_equals(got_elm, null, 'sanity check (too many tests to fit in viewport?)'); >+ assert_equals(got_elm, expected_elm); >+ }, iframeName + ' ' + elm.tagName + ' usemap=' + format_value(elm.useMap)); >+ }); >+ } >+ }); >+ done(); >+}; >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/image-maps/image-map-processing-model/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/image-maps/image-map-processing-model/w3c-import.log >new file mode 100644 >index 00000000000..5ada8d70acc >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/image-maps/image-map-processing-model/w3c-import.log >@@ -0,0 +1,17 @@ >+The tests in this directory were imported from the W3C repository. >+Do NOT modify these tests directly in WebKit. >+Instead, create a pull request on the WPT github: >+ https://github.com/web-platform-tests/wpt >+ >+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport >+ >+Do NOT modify or remove this file. >+ >+------------------------------------------------------------------------ >+Properties requiring vendor prefixes: >+None >+Property values requiring vendor prefixes: >+None >+------------------------------------------------------------------------ >+List of files: >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/image-maps/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/image-maps/w3c-import.log >index 4f69f583b1b..29f10e77a3a 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/image-maps/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/image-maps/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/resources/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/resources/w3c-import.log >index c11fc026698..f98b0104540 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/resources/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/resources/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/svg/intrinsicsize/intrinsicsize-svg-image.tentative-expected.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/svg/intrinsicsize/intrinsicsize-svg-image.tentative-expected.html >new file mode 100644 >index 00000000000..41ddd757eca >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/svg/intrinsicsize/intrinsicsize-svg-image.tentative-expected.html >@@ -0,0 +1,22 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<body> >+<svg width=200 height=200> >+ <image href="/images/background.png" width="32" height="32"/> >+</svg> >+<svg width=200 height=200> >+ <image href="/images/background.png" width="300" height="150"/> >+</svg> >+<svg width=400 height=400> >+ <image href="/images/background.png" width="300" height="150"/> >+</svg> >+<svg width=200 height=200> >+ <image href="/images/background.png" width="300" height="150"/> >+</svg> >+<svg width=200 height=200> >+ <image href="/images/background.png" height="50" width="100"/> >+</svg> >+<svg width=200 height=200> >+ <image href="/images/background.png" width="100" height="100"/> >+</svg> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/svg/intrinsicsize/intrinsicsize-svg-image.tentative.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/svg/intrinsicsize/intrinsicsize-svg-image.tentative.html >new file mode 100644 >index 00000000000..a0943169d0a >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/svg/intrinsicsize/intrinsicsize-svg-image.tentative.html >@@ -0,0 +1,24 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<link rel="match" href="intrinsicsize-svg-image-ref.html"> >+<meta name="assert" content="test"> >+<body> >+<svg width=200 height=200> >+ <image href="/images/background.png"/> >+</svg> >+<svg width=200 height=200> >+ <image href="/images/background.png" intrinsicsize="300x150"/> >+</svg> >+<svg width=400 height=400> >+ <image href="/images/background.png" intrinsicsize="300x150"/> >+</svg> >+<svg width=200 height=200> >+ <image href="/images/background.png" intrinsicsize="300x150" width="300"/> >+</svg> >+<svg width=200 height=200> >+ <image href="/images/background.png" intrinsicsize="300x150" height="50"/> >+</svg> >+<svg width=200 height=200> >+ <image href="/images/background.png" intrinsicsize="300x150" width="100" height="100"/> >+</svg> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/svg/intrinsicsize/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/svg/intrinsicsize/w3c-import.log >new file mode 100644 >index 00000000000..034a82cf8cd >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/svg/intrinsicsize/w3c-import.log >@@ -0,0 +1,18 @@ >+The tests in this directory were imported from the W3C repository. >+Do NOT modify these tests directly in WebKit. >+Instead, create a pull request on the WPT github: >+ https://github.com/web-platform-tests/wpt >+ >+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport >+ >+Do NOT modify or remove this file. >+ >+------------------------------------------------------------------------ >+Properties requiring vendor prefixes: >+None >+Property values requiring vendor prefixes: >+None >+------------------------------------------------------------------------ >+List of files: >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/svg/intrinsicsize/intrinsicsize-svg-image.tentative-expected.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/svg/intrinsicsize/intrinsicsize-svg-image.tentative.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-area-element/resources/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-area-element/resources/w3c-import.log >new file mode 100644 >index 00000000000..97b74cf5934 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-area-element/resources/w3c-import.log >@@ -0,0 +1,17 @@ >+The tests in this directory were imported from the W3C repository. >+Do NOT modify these tests directly in WebKit. >+Instead, create a pull request on the WPT github: >+ https://github.com/web-platform-tests/wpt >+ >+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport >+ >+Do NOT modify or remove this file. >+ >+------------------------------------------------------------------------ >+Properties requiring vendor prefixes: >+None >+Property values requiring vendor prefixes: >+None >+------------------------------------------------------------------------ >+List of files: >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-area-element/resources/area-download-click.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-area-element/support/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-area-element/support/w3c-import.log >index 6451d29e14e..fa87b67835e 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-area-element/support/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-area-element/support/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-area-element/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-area-element/w3c-import.log >index a1a61b41b1e..a03808b80fb 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-area-element/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-area-element/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-audio-element/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-audio-element/w3c-import.log >index 4808d00035c..9b50b109692 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-audio-element/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-audio-element/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html >index 6c969f45cf4..f4662b45f94 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html >@@ -1,5 +1,5 @@ > <!DOCTYPE html> >-<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. --> >+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. --> > <title>Canvas test: size.attributes.parse.whitespace</title> > <script src="/resources/testharness.js"></script> > <script src="/resources/testharnessreport.js"></script> >@@ -12,8 +12,8 @@ > > > <p class="output">Actual output:</p> >-<canvas id="c" class="output" width=" >- 100" height=" >+<canvas id="c" class="output" width=" >+ 100" height=" > 100"><p class="fallback">FAIL (fallback content)</p></canvas> > <p class="output expectedtext">Expected output:<p><img src="size.attributes.parse.whitespace.png" class="output expected" id="expected" alt=""> > <ul id="d"></ul> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/w3c-import.log >index aa1b58bd51f..b52061f427e 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >@@ -102,6 +102,7 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.space.png > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.trailingjunk.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.trailingjunk.png >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.png > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.zero.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.reflect.setcontent.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/document-getters-return-null-for-cross-origin.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/document-getters-return-null-for-cross-origin.html >new file mode 100644 >index 00000000000..89dc5d6d95f >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/document-getters-return-null-for-cross-origin.html >@@ -0,0 +1,14 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<title>Test that getSVGDocument() returns null for a cross-origin document.</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<body> >+<embed src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><rect height="100" width="100"/></svg>'></embed> >+<script> >+const embed = document.querySelector('embed'); >+var t = async_test('HTMLEmbedElement.getSVGDocument() for cross-origin document'); >+window.addEventListener( >+ 'load', t.step_func_done(() => { assert_equals(embed.getSVGDocument(), null); })); >+</script> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04-expected.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04-expected.html >new file mode 100644 >index 00000000000..91d680debf1 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04-expected.html >@@ -0,0 +1,7 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>Embed Reftest Reference</title> >+<link rel="author" title="Intel" href="http://www.intel.com"> >+<body> >+ <p>Test passes if there is <strong>no red</strong>.</p> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04.html >new file mode 100644 >index 00000000000..7cc1b668a6b >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04.html >@@ -0,0 +1,20 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>HTML Test: The embed element represents nothing when it has an object ancestor</title> >+<link rel="author" title="Intel" href="http://www.intel.com"> >+<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-embed-element"> >+<link rel="match" href="embed-represent-nothing-ref.html"> >+<meta name="assert" content="Check if the embed element represents nothing when it has a object ancestor that is not showing its fallback content"> >+<style> >+ embed { >+ background-color: red; >+ height: 100px; >+ width: 100px; >+ } >+</style> >+<body> >+ <p>Test passes if there is <strong>no red</strong>.</p> >+ <object type="application/x-shockwave-flash"> >+ <embed src="/images/red-16x16.png"> >+ </object> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/w3c-import.log >index b604365ca44..8870065ea0e 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >@@ -14,6 +14,7 @@ Property values requiring vendor prefixes: > None > ------------------------------------------------------------------------ > List of files: >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/document-getters-return-null-for-cross-origin.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-dimension.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-document.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-iframe.html >@@ -27,4 +28,6 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-02.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-03-expected.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-03.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04-expected.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-embed-element/historical.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-frame-element/document-getters-return-null-for-cross-origin.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-frame-element/document-getters-return-null-for-cross-origin.html >new file mode 100644 >index 00000000000..2628e910098 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-frame-element/document-getters-return-null-for-cross-origin.html >@@ -0,0 +1,13 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<title>Test that contentDocument returns null for a cross-origin document.</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+var t = async_test('HTMLFrameElement.contentDocument for cross-origin document'); >+window.addEventListener( >+ 'load', t.step_func_done(() => { assert_equals(document.querySelector('frame').contentDocument, null); })); >+</script> >+<frameset> >+<frame src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><rect height="100" width="100"/></svg>'></frame> >+</frameset> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-frame-element/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-frame-element/w3c-import.log >new file mode 100644 >index 00000000000..10ac4c0c6e6 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-frame-element/w3c-import.log >@@ -0,0 +1,17 @@ >+The tests in this directory were imported from the W3C repository. >+Do NOT modify these tests directly in WebKit. >+Instead, create a pull request on the WPT github: >+ https://github.com/web-platform-tests/wpt >+ >+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport >+ >+Do NOT modify or remove this file. >+ >+------------------------------------------------------------------------ >+Properties requiring vendor prefixes: >+None >+Property values requiring vendor prefixes: >+None >+------------------------------------------------------------------------ >+List of files: >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-frame-element/document-getters-return-null-for-cross-origin.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html >index 2cb85700230..b657f26158a 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html >@@ -8,13 +8,20 @@ > async_test(function(t) { > var iframe = document.createElement("iframe"); > document.body.appendChild(iframe); >- iframe.onload = t.step_func(function() { >- assert_true(iframe.contentDocument.location.toString().includes("support/blank.htm")); >- t.done(); >+ var checkedDuringParse = false; >+ iframe.onload = t.step_func_done(function() { >+ testContentDocument(); >+ assert_true(checkedDuringParse); >+ }); >+ >+ let url = "support/iframe-that-checks-contentDocument.html"; >+ window.testContentDocument = t.step_func(function() { >+ assert_true(iframe.contentDocument.location.toString().includes(url)); >+ checkedDuringParse = true; > }); > > assert_equals(iframe.contentDocument.location.toString(), "about:blank"); >- iframe.src = "support/blank.htm?pipe=trickle(d2)"; >+ iframe.src = url + "?pipe=trickle(d2)"; > // The location of the contentDocument should not change until the new document has matured. > assert_equals(iframe.contentDocument.location.toString(), "about:blank"); > }, "contentDocument should only change after a load matures."); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.sub.html >similarity index 80% >rename from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.html >rename to LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.sub.html >index cd27b8ea79c..128892d7ed0 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.sub.html >@@ -5,7 +5,7 @@ > <script src="/resources/testharnessreport.js"></script> > <script src="iframe_harness.js"></script> > <body> >- <iframe src="http://www1.web-platform.test:8000/html/semantics/embedded-content/the-iframe-element/cross_origin_child.html"></iframe> >+ <iframe src="http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/embedded-content/the-iframe-element/cross_origin_child.html"></iframe> > </body> > <script> > get_test_results('bffa23ee-b45a-4e9a-9405-87ab437d5cfa'); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/document-getters-return-null-for-cross-origin.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/document-getters-return-null-for-cross-origin.html >new file mode 100644 >index 00000000000..e3dc0b0e4e6 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/document-getters-return-null-for-cross-origin.html >@@ -0,0 +1,17 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<title>Test that contentDocument/getSVGDocument() return null for a cross-origin document.</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<body> >+<iframe src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><rect height="100" width="100"/></svg>'></iframe> >+<script> >+const iframe = document.querySelector('iframe'); >+var t1 = async_test('HTMLIFrameElement.contentDocument for cross-origin document'); >+window.addEventListener( >+ 'load', t1.step_func_done(() => { assert_equals(iframe.contentDocument, null); })); >+var t2 = async_test('HTMLIFrameElement.getSVGDocument() for cross-origin document'); >+window.addEventListener( >+ 'load', t2.step_func_done(() => { assert_equals(iframe.getSVGDocument(), null); })); >+</script> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-allow.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-allow.html >new file mode 100644 >index 00000000000..9e673149238 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-allow.html >@@ -0,0 +1,66 @@ >+<!doctype html> >+<meta charset=utf-8> >+<title>Check processing of allow attribute in nested browsing context</title> >+<link rel="author" title="Google" href="https://www.google.com"> >+<link rel="help" href="https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-iframe-allow"> >+<link rel="help" href="https://html.spec.whatwg.org/multipage/browsing-the-web.html#initialise-the-document-object"> >+<link rel="help" href="https://fullscreen.spec.whatwg.org/#fullscreen-enabled-flag"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+ >+<div id="log"></div> >+<script> >+ // This returns a data URL (cross-origin with the containing document) which >+ // advances a counter, and reports the counter value together with the >+ // document's fullscreenEnabled state, every time it receives a postMessage. >+ // Fullscreen itself is not important for this test, but the flag is a useful >+ // indicator of whether a policy-controlled-feature is allowed or denied. >+ function getSourceForCrossOriginPage(initial_count) { >+ var page_contents = "<html><body><script>var count="+initial_count+";window.addEventListener('message',function(){parent.postMessage({'count':count++,'fullscreenEnabled':document.fullscreenEnabled},'*');});</scr"+"ipt></body></html>"; >+ return "data:text/html;base64,"+btoa(page_contents); >+ } >+ >+ async_test(function(t) { >+ var iframe = document.createElement("iframe"); >+ iframe.src = getSourceForCrossOriginPage(0); >+ >+ iframe.addEventListener('load', function() { >+ // Request the fullscreenEnabled state whenever the frame loads >+ iframe.contentWindow.postMessage(true,"*"); >+ }); >+ >+ window.addEventListener('message', this.step_func(function(msg) { >+ if (msg.data.count == 0) { >+ assert_false(msg.data.fullscreenEnabled, "Document inside cross-origin iframe without allow attribute should not have feature enabled"); >+ iframe.setAttribute("allow", "fullscreen"); >+ iframe.contentWindow.postMessage(true,"*"); // Request state again >+ } else if (msg.data.count == 1) { >+ assert_false(msg.data.fullscreenEnabled, "Feature should be denied when correct allow attribute is added, before reload"); >+ iframe.src = getSourceForCrossOriginPage(2); // Reload the frame >+ } else if (msg.data.count == 2) { >+ assert_true(msg.data.fullscreenEnabled, "Feature should be allowed when correct allow attribute is added, after reload"); >+ iframe.removeAttribute("allow"); >+ iframe.contentWindow.postMessage(true,"*"); // Request state again >+ } else if (msg.data.count == 3) { >+ assert_true(msg.data.fullscreenEnabled, "Feature should be allowed when allow attribute is removed, before reload"); >+ iframe.src = getSourceForCrossOriginPage(4); // Reload the frame >+ } else if (msg.data.count == 4) { >+ assert_false(msg.data.fullscreenEnabled, "Feature should be denied when allow attribute is removed, after reload"); >+ iframe.setAttribute("allow", "payment"); // Set allow to an unrelated feature >+ iframe.src = getSourceForCrossOriginPage(5); // Reload the frame >+ } else if (msg.data.count == 5) { >+ assert_false(msg.data.fullscreenEnabled, "Feature should be denied with incorrect allow attribute"); >+ iframe.setAttribute("allow", "payment;fullscreen"); // Include fullscreen again >+ iframe.src = getSourceForCrossOriginPage(6); // Reload the frame >+ } else if (msg.data.count == 6) { >+ assert_true(msg.data.fullscreenEnabled, "Feature should be allowed with complex allow attribute"); >+ t.done(); >+ } else { >+ assert_unreached(); >+ } >+ })); >+ >+ document.body.appendChild(iframe); >+ }, "iframe-cross-origin-allow"); >+ >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-allowfullscreen.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-allowfullscreen.html >index da5791a2de9..9fc285bf3e1 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-allowfullscreen.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-allowfullscreen.html >@@ -3,13 +3,21 @@ > <title>Check how allowfullscreen affects fullscreen enabled flag</title> > <link rel="author" title="Xidorn Quan" href="https://www.upsuper.org"> > <link rel="author" title="Mozilla" href="https://www.mozilla.org"> >-<link rel="help" href="https://html.spec.whatwg.org/multipage/browsers.html#initialise-the-document-object"> >+<link rel="help" href="https://html.spec.whatwg.org/multipage/browsing-the-web.html#initialise-the-document-object"> > <link rel="help" href="https://fullscreen.spec.whatwg.org/#fullscreen-enabled-flag"> > <script src="/resources/testharness.js"></script> > <script src="/resources/testharnessreport.js"></script> > > <div id="log"></div> > <script> >+ // This returns a data URL (cross-origin with the containing document) which >+ // advances a counter, and reports the counter value together with the >+ // document's fullscreenEnabled state, every time it receives a postMessage. >+ function getSourceForCrossOriginPage(initial_count) { >+ var page_contents = "<html><body><script>var count="+initial_count+";window.addEventListener('message',function(){parent.postMessage({'count':count++,'fullscreenEnabled':document.fullscreenEnabled},'*');});</scr"+"ipt></body></html>"; >+ return "data:text/html;base64,"+btoa(page_contents); >+ } >+ > async_test(function(t) { > var iframe = document.createElement("iframe"); > iframe.src = "support/blank.htm"; >@@ -21,13 +29,45 @@ > > assert_true(document.fullscreenEnabled, "Top level document has fullscreen enabled flag set"); > eventWatcher.wait_for("load").then(t.step_func_done(function() { >- assert_false(iframe.contentDocument.fullscreenEnabled, "Document inside iframe without allowfullscreen attribute should not have fullscreen enabled flag set"); >- iframe.setAttribute("allowfullscreen", true); >- assert_true(iframe.contentDocument.fullscreenEnabled, "Fullscreen should be allowed when allowfullscreen attribute is set"); >- iframe.removeAttribute("allowfullscreen"); >- assert_false(iframe.contentDocument.fullscreenEnabled, "Fullscreen should be denied when allowfullscreen attribute is removed"); >+ assert_true(iframe.contentDocument.fullscreenEnabled, "Document inside same-origin iframe without allowfullscreen attribute should still have fullscreen enabled flag set"); > })); >- }, "iframe-allowfullscreen"); >+ }, "iframe-same-origin-allowfullscreen"); >+ >+ async_test(function(t) { >+ var iframe = document.createElement("iframe"); >+ iframe.src = getSourceForCrossOriginPage(0); >+ >+ iframe.addEventListener('load', function() { >+ // Request the fullscreenEnabled state whenever the frame loads >+ iframe.contentWindow.postMessage(true,"*"); >+ }); >+ >+ window.addEventListener('message', this.step_func(function(msg) { >+ if (msg.data.count == 0) { >+ assert_false(msg.data.fullscreenEnabled, "Document inside cross-origin iframe without allowfullscreen attribute should not have fullscreen enabled flag set"); >+ iframe.setAttribute("allowfullscreen", ""); >+ iframe.contentWindow.postMessage(true,"*"); // Request state again >+ } else if (msg.data.count == 1) { >+ assert_false(msg.data.fullscreenEnabled, "Fullscreen should be denied when allowfullscreen attribute is added, before reload"); >+ iframe.src = getSourceForCrossOriginPage(2); // Reload the frame >+ } else if (msg.data.count == 2) { >+ assert_true(msg.data.fullscreenEnabled, "Fullscreen should be allowed when allowfullscreen attribute is added, after reload"); >+ iframe.removeAttribute("allowfullscreen"); >+ iframe.contentWindow.postMessage(true,"*"); // Request state again >+ } else if (msg.data.count == 3) { >+ assert_true(msg.data.fullscreenEnabled, "Fullscreen should be allowed when allowfullscreen attribute is removed, before reload"); >+ iframe.src = getSourceForCrossOriginPage(4); // Reload the frame >+ } else if (msg.data.count == 4) { >+ assert_false(msg.data.fullscreenEnabled, "Fullscreen should be denied when allowfullscreen attribute is removed, after reload"); >+ t.done(); >+ } >+ })); >+ >+ document.body.appendChild(iframe); >+ t.add_cleanup(function() { >+ document.body.removeChild(iframe); >+ }); >+ }, "iframe-cross-origin-allowfullscreen"); > > /* Fullscreen enabled flag with about:blank */ > >@@ -41,7 +81,7 @@ > > test(function() { > test_allowfullscreen_noload(function() {}, function(doc) { >- assert_false(doc.fullscreenEnabled, "Fullscreen should not be enabled without allowfullscreen attribute"); >+ assert_true(doc.fullscreenEnabled, "Fullscreen should still be enabled in same-origin document without allowfullscreen attribute"); > }); > }, "iframe-noload-noallowfullscreen"); > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-nosrc.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-nosrc.html >new file mode 100644 >index 00000000000..57189a0b884 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-nosrc.html >@@ -0,0 +1,26 @@ >+<!DOCTYPE html> >+<meta charset="UTF-8"> >+<title>Check processing of iframe without src and srcdoc attribute</title> >+<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org"> >+<link rel="author" title="Mozilla" href="https://www.mozilla.org"> >+<link rel="help" href="https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+ >+<div id="log"></div> >+<iframe></iframe> >+<script> >+ let iframe = document.querySelector("iframe"); >+ >+ async_test(t => { >+ let originDoc = iframe.contentDocument; >+ window.addEventListener("load", t.step_func_done(() => { >+ assert_equals(iframe.contentDocument, originDoc, "contentDocument shouldn't be changed"); >+ })); >+ }, "iframe.contentDocument should not be changed"); >+ >+ async_test(t => { >+ iframe.addEventListener("load", t.unreached_func()); >+ window.addEventListener("load", () => t.done()); >+ }, "load event of iframe should not be fired after processing the element"); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_javascript_url_01.htm b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_javascript_url_01.htm >index d6c2abe7d57..fd65f932982 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_javascript_url_01.htm >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_javascript_url_01.htm >@@ -18,7 +18,8 @@ var expected = { > ifr1:{url:"about:blank", sameDom: true}, > ifr2:{url:"about:blank", sameDom: true}, > ifr3:{url: location.href.replace(/\/[^\/]*$/, '/'), sameDom: true }, >- ifr4:{url:"about:blank", sameDom: true} >+ ifr4:{url:"about:blank", sameDom: true}, >+ ifr5:{url:"about:blank", sameDom: true} > } > > var js_url = 'javascript:"<html><script>var sameDom = false; try{var cn = top.document.body.className;sameDom = true;}catch(e){}; parent.postMessage( {url: document.URL, name: name, sameDom: sameDom}, \'*\')<\/script><body><p>JS-generated document</p></body></<html>";' >@@ -46,8 +47,15 @@ window.onload = function () { > results[frame.name] = 'Exception on setting!'; > } > }; >+ >+ // An iframe with an initial src of a javascript: URL should also have a >+ // document URL of about:blank. >+ var ifr = document.createElement('iframe'); >+ ifr.name = 'ifr5'; >+ ifr.src = js_url; >+ document.body.appendChild(ifr); > } > > </script> > </body> >-</html> >\ No newline at end of file >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_remove_src.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_remove_src.html >new file mode 100644 >index 00000000000..f0ff9ff5082 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_remove_src.html >@@ -0,0 +1,40 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<title>Test that removing the src attribute of an iframe loads about:blank >+ instead of whatever was loaded previously.</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<body> >+ <script> >+ var iframe; >+ var t = async_test(); >+ t.step(setupFrame); >+ >+ function setupFrame() { >+ iframe = document.createElement("iframe"); >+ iframe.src = URL.createObjectURL(new Blob(["text"], { type: "text/html" })); >+ iframe.onload = t.step_func(blobLoaded); >+ document.body.appendChild(iframe); >+ } >+ >+ var removalRunning = false; >+ function blobLoaded() { >+ assert_equals(iframe.contentDocument.location.protocol, "blob:", >+ "Should have loaded the blob"); >+ assert_equals(iframe.contentDocument.documentElement.textContent, "text", >+ "Should have loaded the blob text"); >+ iframe.onload = t.step_func_done(aboutBlankLoaded); >+ removalRunning = true; >+ iframe.removeAttribute("src"); >+ removalRunning = false; >+ } >+ >+ function aboutBlankLoaded() { >+ assert_false(removalRunning, "Should not have loaded about:blank sync"); >+ assert_equals(iframe.contentDocument.location.href, "about:blank", >+ "Should have loaded about:blank"); >+ assert_equals(iframe.contentDocument.documentElement.textContent, "", >+ "Should have loaded the about:blank text"); >+ } >+ </script> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1.html >index b0875ec6b91..feb876608ac 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1.html >@@ -10,25 +10,15 @@ > <body> > <iframe sandbox="allow-top-navigation allow-scripts"></iframe> > <script> >- if (opener) { >- // We're the popup (i.e. a top frame). Load into the iframe the page >- // trying to modifying the top frame and transmit the result to our >- // opener. >- onmessage = function(e) { >- opener.postMessage(e.data, "*") >- } >- document.querySelector("iframe").src = "support/iframe-that-performs-top-navigation-on-popup.html"; >- } else { >- // We are the main test page. Open ourselves as a popup, so that we can >- // can experiment navigation of the top frame. >- async_test(t => { >- window.addEventListener("message", t.step_func_done(e => { >- assert_equals(e.data, "can navigate"); >- e.source.close(); >- })); >- window.open(location.href); >- }, "Frames with `allow-top-navigation` should be able to navigate the top frame."); >- } >+ // We are the main test page. Open a popup, so that we can >+ // can experiment navigation of the top frame. >+ async_test(t => { >+ window.addEventListener("message", t.step_func_done(e => { >+ assert_equals(e.data, "can navigate"); >+ e.source.close(); >+ })); >+ window.open("support/load-into-the-iframe.html"); >+ }, "Frames with `allow-top-navigation` should be able to navigate the top frame."); > </script> > </body> > </html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2.html >index 6113c6c3478..bd7d92c0ddc 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2.html >@@ -8,27 +8,16 @@ > <script src="/resources/testharnessreport.js"></script> > </head> > <body> >- <iframe sandbox="allow-scripts"></iframe> > <script> >- if (opener) { >- // We're the popup (i.e. a top frame). Load into the iframe the page >- // trying to modifying the top frame and transmit the result to our >- // opener. >- onmessage = function(e) { >- opener.postMessage(e.data, "*") >- } >- document.querySelector("iframe").src = "support/iframe-that-performs-top-navigation-on-popup.html"; >- } else { >- // We are the main test page. Open ourselves as a popup, so that we can >- // can experiment navigation of the top frame. >- async_test(t => { >- window.addEventListener("message", t.step_func_done(e => { >- assert_equals(e.data, "cannot navigate"); >- e.source.close(); >- })); >- window.open(location.href); >- }, "Frames without `allow-top-navigation` should not be able to navigate the top frame."); >- } >+ // We are the main test page. Open a popup, so that we can >+ // can experiment navigation of the top frame. >+ async_test(t => { >+ window.addEventListener("message", t.step_func_done(e => { >+ assert_equals(e.data, "cannot navigate"); >+ e.source.close(); >+ })); >+ window.open('support/load-into-the-iframe.html'); >+ }, "Frames without `allow-top-navigation` should not be able to navigate the top frame."); > </script> > </body> > </html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3.html >index 9de5d53466e..c7c56d670e5 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3.html >@@ -14,25 +14,15 @@ > error: allow-top-navigation-by-user-activation will have no effect. --> > <iframe sandbox="allow-top-navigation allow-top-navigation-by-user-activation allow-scripts"></iframe> > <script> >- if (opener) { >- // We're the popup (i.e. a top frame). Load into the iframe the page >- // trying to modifying the top frame and transmit the result to our >- // opener. >- onmessage = function(e) { >- opener.postMessage(e.data, "*") >- } >- document.querySelector("iframe").src = "support/iframe-that-performs-top-navigation-on-popup.html"; >- } else { >- // We are the main test page. Open ourselves as a popup, so that we can >- // can experiment navigation of the top frame. >- async_test(t => { >- window.addEventListener("message", t.step_func_done(e => { >- assert_equals(e.data, "can navigate"); >- e.source.close(); >- })); >- window.open(location.href); >- }, "Frames with `allow-top-navigation` should be able to navigate the top frame even when `allow-top-navigation-by-user-activation` is set."); >- } >+ // We are the main test page. Open a popup, so that we can >+ // can experiment navigation of the top frame. >+ async_test(t => { >+ window.addEventListener("message", t.step_func_done(e => { >+ assert_equals(e.data, "can navigate"); >+ e.source.close(); >+ })); >+ window.open("support/load-into-the-iframe.html"); >+ }, "Frames with `allow-top-navigation` should be able to navigate the top frame even when `allow-top-navigation-by-user-activation` is set."); > </script> > </body> > </html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/src-repeated-in-ancestor.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/src-repeated-in-ancestor.html >new file mode 100644 >index 00000000000..2f77dfe164d >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/src-repeated-in-ancestor.html >@@ -0,0 +1,138 @@ >+<!doctype html> >+<meta charset="utf-8"> >+<title>Navigation should not occur when `src` matches the location of a anscestor browsing context</title> >+<script> >+// Avoid recursion in non-conforming browsers >+if (parent !== window && parent.title == window.title) { >+ window.stop(); >+} >+</script> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<body> >+<script> >+/** >+ * This test uses the `beforeunload` event to detect navigation. Because that >+ * event is fired synchronously in response to "process the iframe attributes", >+ * a second "control" iframe may be used to verify cases where navigation >+ * should *not* occur. `Promise.race` ensures that tests complete as soon as >+ * possible. >+ * >+ * Although the specification dictates that the `beforeunload` event must be >+ * emitted synchronously during navigation, a number of user agents do not >+ * adhere to this requirement. WPT includes a dedicated test for synchronous >+ * emission of the event [1]. This test is authored to support non-standard >+ * behavior in order to avoid spuriously passing in those UAs. >+ * >+ * [1] https://github.com/web-platform-tests/wpt/pull/12343 >+ */ >+'use strict'; >+ >+function when(target, eventName) { >+ return new Promise(function(resolve, reject) { >+ target.addEventListener(eventName, function() { >+ resolve(); >+ }, { once: true }); >+ target.addEventListener('error', function() { >+ reject(new Error('Error while waiting for ' + eventName)); >+ }, { once: true }); >+ }); >+} >+ >+function init(doc, t) { >+ var iframes = [doc.createElement('iframe'), doc.createElement('iframe')]; >+ >+ iframes.forEach(function(iframe) { >+ iframe.src = '/common/blank.html'; >+ doc.body.appendChild(iframe); >+ >+ t.add_cleanup(function() { >+ iframe.parentNode.removeChild(iframe); >+ }); >+ }); >+ >+ return Promise.all([when(iframes[0], 'load'), when(iframes[1], 'load')]) >+ .then(function() { return iframes; }); >+} >+ >+// This test verifies that navigation does occur; it is intended to validate >+// the utility functions. >+promise_test(function(t) { >+ return init(document, t) >+ .then(function(iframes) { >+ var subjectNavigation = when(iframes[0].contentWindow, 'beforeunload'); >+ var controlNavigation = when(iframes[1].contentWindow, 'beforeunload'); >+ >+ iframes[0].src = '/common/blank.html?2'; >+ iframes[1].src = '/common/blank.html?3'; >+ >+ return Promise.all([subjectNavigation, controlNavigation]); >+ }); >+}, 'different path name'); >+ >+promise_test(function(t) { >+ return init(document, t) >+ .then(function(iframes) { >+ var subjectNavigation = when(iframes[0].contentWindow, 'beforeunload'); >+ var controlNavigation = when(iframes[1].contentWindow, 'beforeunload'); >+ >+ iframes[0].src = location.href; >+ iframes[1].src = '/common/blank.html?4'; >+ >+ return Promise.race([ >+ subjectNavigation.then(function() { >+ assert_unreached('Should not navigate'); >+ }), >+ controlNavigation >+ ]); >+ }); >+}, 'same path name, no document fragment'); >+ >+promise_test(function(t) { >+ return init(document, t) >+ .then(function(iframes) { >+ var subjectNavigation = when(iframes[0].contentWindow, 'beforeunload'); >+ var controlNavigation = when(iframes[1].contentWindow, 'beforeunload'); >+ >+ iframes[0].src = location.href + '#something-else'; >+ iframes[1].src = '/common/blank.html?5'; >+ >+ return Promise.race([ >+ subjectNavigation.then(function() { >+ assert_unreached('Should not navigate'); >+ }), >+ controlNavigation >+ ]); >+ }); >+}, 'same path name, different document fragment'); >+ >+promise_test(function(t) { >+ var intermediate = document.createElement('iframe'); >+ >+ document.body.appendChild(intermediate); >+ >+ t.add_cleanup(function() { >+ intermediate.parentNode.removeChild(intermediate); >+ }); >+ intermediate.contentDocument.open(); >+ intermediate.contentDocument.write('<body></body>'); >+ intermediate.contentDocument.close(); >+ >+ return init(intermediate.contentDocument, t) >+ .then(function(iframes) { >+ var subjectNavigation = when(iframes[0].contentWindow, 'beforeunload'); >+ var controlNavigation = when(iframes[1].contentWindow, 'beforeunload'); >+ >+ iframes[0].src = location.href; >+ iframes[1].src = '/common/blank.html?6'; >+ >+ return Promise.race([ >+ subjectNavigation.then(function() { >+ assert_unreached('Should not navigate'); >+ }), >+ controlNavigation >+ ]); >+ }); >+}, 'same path name, no document fragement (intermediary browsing context)'); >+</script> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-checks-contentDocument.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-checks-contentDocument.html >new file mode 100644 >index 00000000000..bc35a977e8b >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-checks-contentDocument.html >@@ -0,0 +1,3 @@ >+<script> >+ parent.testContentDocument(); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/load-into-the-iframe.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/load-into-the-iframe.html >new file mode 100644 >index 00000000000..05a80be7374 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/load-into-the-iframe.html >@@ -0,0 +1,19 @@ >+ >+<!DOCTYPE html> >+<html> >+ <head> >+ <meta charset="utf-8"> >+ </head> >+ <body> >+ <iframe sandbox="allow-scripts"></iframe> >+ <script> >+ // We're the popup (i.e. a top frame). Load into the iframe the page >+ // trying to modifying the top frame and transmit the result to our >+ // opener. >+ onmessage = function(e) { >+ opener.postMessage(e.data, "*") >+ } >+ document.querySelector("iframe").src = "iframe-that-performs-top-navigation-on-popup.html"; >+ </script> >+ </body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log >index a4fe121fc55..68bbb2fb0db 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >@@ -15,6 +15,7 @@ None > ------------------------------------------------------------------------ > List of files: > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/blank.htm >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-checks-contentDocument.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-opens-modals.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-on-popup.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-without-user-gesture-failed.html >@@ -46,6 +47,7 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe_sandbox_031.htm > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe_sandbox_032.htm > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe_sandbox_block_modals.js >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/load-into-the-iframe.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/navigation-changed-iframe.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/sandbox.pdf > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/sandbox_allow_script.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log >index f18ded2d724..bcd81314bcd 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >@@ -20,16 +20,20 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/cross_origin_child.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/cross_origin_grandchild.html >-/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.sub.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/document-getters-return-null-for-cross-origin.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/historical.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-allow.html > /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-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 > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-with-base.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_harness.js > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_javascript_url_01.htm >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_remove_src.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2.html >@@ -82,4 +86,5 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/sandbox_030.htm > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/sandbox_031.htm > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/sandbox_032.htm >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/src-repeated-in-ancestor.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/stash.py >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/404-response-with-actual-image-data.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/404-response-with-actual-image-data.html >new file mode 100644 >index 00000000000..73b937f67fd >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/404-response-with-actual-image-data.html >@@ -0,0 +1,18 @@ >+<!DOCTYPE HTML> >+<meta charset="utf-8"> >+<title>404 response with actual image data should be rendered and load event is fired</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+ >+<img id="img"> >+ >+<script> >+ async_test(t => { >+ var img = document.getElementById("img"); >+ img.onload = t.step_func_done(e => { >+ assert_equals(e.type, "load", "image.onload() called"); >+ }); >+ img.onerror = t.unreached_func("image.onerror() was not supposed to be called"); >+ img.src = "404-response-with-actual-image-data.py"; >+ }, "404 response with actual image data should be rendered and load event is fired"); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/404-response-with-actual-image-data.py b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/404-response-with-actual-image-data.py >new file mode 100644 >index 00000000000..e4216c6d53f >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/404-response-with-actual-image-data.py >@@ -0,0 +1,3 @@ >+import base64 >+def main(req, res): >+ return 404, [('Content-Type', 'image/png')], base64.decodestring("iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAhSURBVDhPY3wro/KfgQLABKXJBqMGjBoAAqMGDLwBDAwAEsoCTFWunmQAAAAASUVORK5CYII=") >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/Image-constructor.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/Image-constructor.html >index aa838ec8774..38b6765bb49 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/Image-constructor.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/Image-constructor.html >@@ -32,6 +32,11 @@ > assert_equals(Image.prototype, HTMLImageElement.prototype, "Image.prototype is same as HTMLImageElement.prototype"); > assert_equals(new Image().__proto__, HTMLImageElement.prototype, "Image __proto__ is HTMLImageElement prototype "); > assert_equals(Image.prototype.__proto__, HTMLElement.prototype, "Image.prototype __proto__ is HTMLElement prototype"); >+ >+ const desc = Object.getOwnPropertyDescriptor(Image, "prototype"); >+ assert_false(desc.configurable, "Image.prototype is not configurable"); >+ assert_false(desc.enumerable, "Image.prototype is not enumerable"); >+ assert_false(desc.writable, "Image.prototype is not writable"); > }, "NamedConstructor creates the correct object structure."); > > </script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/available-images-expected.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/available-images-expected.html >new file mode 100644 >index 00000000000..8061abae508 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/available-images-expected.html >@@ -0,0 +1,2 @@ >+<!doctype html> >+<img src="3.jpg"> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/available-images-onload.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/available-images-onload.html >new file mode 100644 >index 00000000000..5fc5cb8b619 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/available-images-onload.html >@@ -0,0 +1,33 @@ >+<!doctype html> >+<html> >+<title>Ensure images from available images list can be drawn to a canvas</title> >+<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-list-of-available-images"> >+<meta charset="utf-8"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+ async_test(function(t) { >+ var i = new Image(); >+ i.onerror = t.unreached_func(); >+ i.onload = t.step_func(function() { >+ var i2 = new Image(); >+ // Potentially start multiple image loading tasks by performing several >+ // relevant mutations. This could lead to an invalid state later in an >+ // erroneous implementation. >+ i2.crossOrigin = true; >+ // Start an image loading task that is expected to short-circuit since >+ // the requested image is present in the list of available images. >+ i2.src = "3.jpg"; >+ i2.onerror = t.unreached_func(); >+ // Ensure the loaded image is in a state that is usable by a 2d canvas. >+ i2.onload = t.step_func_done(function() { >+ var c = document.createElement('canvas'); >+ var ctx = c.getContext('2d'); >+ ctx.drawImage(i2, 0, 0); >+ }); >+ }); >+ // Request an image which should be added to the list of available images. >+ i.src = "3.jpg"; >+ }); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/available-images.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/available-images.html >new file mode 100644 >index 00000000000..779ff978689 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/available-images.html >@@ -0,0 +1,17 @@ >+<!doctype html> >+<html class="reftest-wait"> >+<title>Ensure images from available images list are rendered</title> >+<meta charset="utf-8"> >+<link rel="match" href="available-images-ref.html"> >+<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-img-element"> >+<div id="log"></div> >+<script> >+ var i = new Image(); >+ i.onload = function() { >+ var i2 = new Image(); >+ i2.src = "3.jpg"; >+ document.body.appendChild(i2); >+ document.documentElement.classList.remove("reftest-wait"); >+ }; >+ i.src = "3.jpg"; >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/current-pixel-density/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/current-pixel-density/w3c-import.log >index 7347d6329a7..9e32235327e 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/current-pixel-density/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/current-pixel-density/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-iframe.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-iframe.html >new file mode 100644 >index 00000000000..56060cb5d64 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-iframe.html >@@ -0,0 +1,54 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<meta name="timeout" content="long"> >+<title>HTMLImageElement.prototype.decode(), iframe tests.</title> >+<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> >+<link rel=help href="https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-decode"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+ >+<iframe id="frame_loaded" srcdoc="iframe"></iframe> >+<iframe id="frame_notloaded" srcdoc="iframe"></iframe> >+<iframe id="frame_notloaded2" srcdoc="iframe"></iframe> >+ >+<script> >+"use strict"; >+ >+promise_test(function() { >+ return new Promise(function(resolve, reject) { >+ var frame = document.getElementById("frame_loaded"); >+ var img = frame.contentDocument.createElement("img"); >+ img.src = "/images/green.png"; >+ img.onload = function() { >+ // At this point the frame which created the img is removed, so decode() should fail. >+ frame.parentNode.removeChild(frame); >+ img.decode().then(function() { >+ assert_false(true, "Unexpected success"); >+ }, function() { >+ resolve(); >+ }); >+ }; >+ }); >+}, document.title + " Decode from removed iframe fails (loaded img)"); >+ >+promise_test(function(t) { >+ var frame = document.getElementById("frame_notloaded"); >+ var img = frame.contentDocument.createElement("img"); >+ img.src = "/images/green.png"; >+ frame.parentNode.removeChild(frame); >+ var promise = img.decode(); >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " Decode from removed iframe fails (img not loaded)"); >+ >+promise_test(function(t) { >+ var frame = document.getElementById("frame_notloaded2"); >+ var img = frame.contentDocument.createElement("img"); >+ img.src = "/images/green.png"; >+ // First request a promise, then remove the iframe. >+ var promise = img.decode(); >+ frame.parentNode.removeChild(frame); >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " Decode from iframe, later removed, fails (img not loaded)"); >+ >+</script> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes-svg.tentative.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes-svg.tentative.html >new file mode 100644 >index 00000000000..d8d55a81478 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes-svg.tentative.html >@@ -0,0 +1,82 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<meta name="timeout" content="long"> >+<title>SVGImageElement.prototype.decode(), href mutation tests.</title> >+<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+ >+<script> >+"use strict"; >+ >+// src tests >+// ------------------- >+promise_test(function(t) { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', "/images/green.png"); >+ var promise = img.decode(); >+ img.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', "/images/green.svg"); >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " xlink:href changes fail decode."); >+ >+promise_test(function(t) { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttribute('href', "/images/green.png"); >+ var promise = img.decode(); >+ img.setAttribute('href', "/images/green.svg"); >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " href changes fail decode."); >+ >+promise_test(function(t) { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', "/images/green.png"); >+ var first_promise = img.decode(); >+ img.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', "/images/green.svg"); >+ var second_promise = img.decode(); >+ assert_not_equals(first_promise, second_promise); >+ return Promise.all([ >+ promise_rejects(t, "EncodingError", first_promise), >+ second_promise >+ ]); >+}, document.title + " xlink:href changes fail decode; following good decode succeeds."); >+ >+promise_test(function(t) { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttribute('href', "/images/green.png"); >+ var first_promise = img.decode(); >+ img.setAttribute('href', "/images/green.svg"); >+ var second_promise = img.decode(); >+ assert_not_equals(first_promise, second_promise); >+ return Promise.all([ >+ promise_rejects(t, "EncodingError", first_promise), >+ second_promise >+ ]); >+}, document.title + " href changes fail decode; following good decode succeeds."); >+ >+promise_test(function(t) { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', "/images/green.png"); >+ var first_promise = img.decode(); >+ img.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', "/non/existent/path.png"); >+ var second_promise = img.decode(); >+ assert_not_equals(first_promise, second_promise); >+ return Promise.all([ >+ promise_rejects(t, "EncodingError", first_promise), >+ promise_rejects(t, "EncodingError", second_promise) >+ ]); >+}, document.title + " xlink:href changes fail decode; following bad decode fails."); >+ >+promise_test(function(t) { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttribute('href', "/images/green.png"); >+ var first_promise = img.decode(); >+ img.setAttribute('href', "/non/existent/path.png"); >+ var second_promise = img.decode(); >+ assert_not_equals(first_promise, second_promise); >+ return Promise.all([ >+ promise_rejects(t, "EncodingError", first_promise), >+ promise_rejects(t, "EncodingError", second_promise) >+ ]); >+}, document.title + " href changes fail decode; following bad decode fails."); >+ >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes.html >new file mode 100644 >index 00000000000..82f98549c63 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes.html >@@ -0,0 +1,121 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<meta name="timeout" content="long"> >+<title>HTMLImageElement.prototype.decode(), src/srcset mutation tests.</title> >+<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> >+<link rel=help href="https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-decode"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+ >+<script> >+"use strict"; >+ >+// src tests >+// ------------------- >+promise_test(function(t) { >+ var img = new Image(); >+ img.src = "/images/green.png"; >+ var promise = img.decode(); >+ img.src = "/images/green.svg"; >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " src changes fail decode."); >+ >+promise_test(function(t) { >+ var img = new Image(); >+ img.src = "/images/green.png"; >+ var first_promise = img.decode(); >+ img.src = "/images/blue.png"; >+ var second_promise = img.decode(); >+ assert_not_equals(first_promise, second_promise); >+ return Promise.all([ >+ promise_rejects(t, "EncodingError", first_promise), >+ second_promise >+ ]); >+}, document.title + " src changes fail decode; following good png decode succeeds."); >+ >+promise_test(function(t) { >+ var img = new Image(); >+ img.src = "/images/green.png"; >+ var first_promise = img.decode(); >+ img.src = "/images/green.svg"; >+ var second_promise = img.decode(); >+ assert_not_equals(first_promise, second_promise); >+ return Promise.all([ >+ promise_rejects(t, "EncodingError", first_promise), >+ second_promise >+ ]); >+}, document.title + " src changes fail decode; following good svg decode succeeds."); >+ >+promise_test(function(t) { >+ var img = new Image(); >+ img.src = "/images/green.png"; >+ var first_promise = img.decode(); >+ img.src = "/non/existent/path.png"; >+ var second_promise = img.decode(); >+ assert_not_equals(first_promise, second_promise); >+ return Promise.all([ >+ promise_rejects(t, "EncodingError", first_promise), >+ promise_rejects(t, "EncodingError", second_promise) >+ ]); >+}, document.title + " src changes fail decode; following bad decode fails."); >+ >+promise_test(function(t) { >+ return new Promise(function(resolve, reject) { >+ var img = new Image(); >+ // We wait for an onload, since the "Updating the image data" spec states >+ // that if a new microtask is scheduled, the old one is canceled so >+ // without the onload, the first decode request would be requested when the >+ // img.src is empty. With an onload, we ensure that the img.src is set and >+ // the image exists before issuing the first decode, then we verify that the >+ // src change to the same value does not prevent that request from >+ // succeeding. >+ img.onload = t.step_func(function() { >+ img.onload = null; >+ >+ var first_promise = img.decode(); >+ img.src = "/images/green.png"; >+ var second_promise = img.decode(); >+ assert_not_equals(first_promise, second_promise); >+ resolve(Promise.all([first_promise, second_promise])); >+ }); >+ img.src = "/images/green.png"; >+ }); >+}, document.title + " src changes to the same path succeed."); >+ >+// srcset tests >+// ------------------- >+promise_test(function(t) { >+ var img = new Image(); >+ img.srcset = "/images/green.png 100w"; >+ var promise = img.decode(); >+ img.srcset = "/images/green.svg 100w"; >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " srcset changes fail decode."); >+ >+promise_test(function(t) { >+ var img = new Image(); >+ img.srcset = "/images/green.png 100w"; >+ var first_promise = img.decode(); >+ img.srcset = "/images/green.svg 100w"; >+ var second_promise = img.decode(); >+ assert_not_equals(first_promise, second_promise); >+ return Promise.all([ >+ promise_rejects(t, "EncodingError", first_promise), >+ second_promise >+ ]); >+}, document.title + " srcset changes fail decode; following good decode succeeds."); >+ >+promise_test(function(t) { >+ var img = new Image(); >+ img.srcset = "/images/green.png 100w"; >+ var first_promise = img.decode(); >+ img.srcset = "/non/existent/path.png 100w"; >+ var second_promise = img.decode(); >+ assert_not_equals(first_promise, second_promise); >+ return Promise.all([ >+ promise_rejects(t, "EncodingError", first_promise), >+ promise_rejects(t, "EncodingError", second_promise) >+ ]); >+}, document.title + " srcset changes fail decode; following bad decode fails."); >+ >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-picture.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-picture.html >new file mode 100644 >index 00000000000..e3195d9d04d >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-picture.html >@@ -0,0 +1,133 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<meta name="timeout" content="long"> >+<title>HTMLImageElement.prototype.decode(), picture tests.</title> >+<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> >+<link rel=help href="https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-decode"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+ >+<picture> >+<source srcset="/images/green.png"> >+<source srcset="/images/blue.png"> >+<img id="testimg"> >+</picture> >+ >+<script> >+"use strict"; >+ >+promise_test(function() { >+ var picture = document.createElement("picture"); >+ var source = document.createElement("source"); >+ var img = document.createElement("img"); >+ >+ picture.appendChild(source); >+ picture.appendChild(img); >+ >+ source.srcset = "/images/green.png"; >+ >+ return img.decode().then(function(arg) { >+ assert_equals(arg, undefined); >+ }); >+}, document.title + " Image with PNG source decodes with undefined."); >+ >+promise_test(function() { >+ var img = document.getElementById("testimg"); >+ return img.decode().then(function(arg) { >+ assert_equals(arg, undefined); >+ }); >+}, document.title + " Image with multiple sources decodes with undefined."); >+ >+promise_test(function() { >+ var picture = document.createElement("picture"); >+ var source = document.createElement("source"); >+ var img = document.createElement("img"); >+ >+ picture.appendChild(source); >+ picture.appendChild(img); >+ >+ source.srcset = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIA" + >+ "AAD91JpzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QUSEioKsy" + >+ "AgywAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAW" + >+ "SURBVAjXY9y3bx8DAwPL58+fGRgYACktBRltLfebAAAAAElFTkSuQmCC"; >+ >+ return img.decode().then(function(arg) { >+ assert_equals(arg, undefined); >+ }); >+}, document.title + " Image with PNG data URL source decodes with undefined."); >+ >+promise_test(function() { >+ var picture = document.createElement("picture"); >+ var source = document.createElement("source"); >+ var img = document.createElement("img"); >+ >+ picture.appendChild(source); >+ picture.appendChild(img); >+ >+ source.srcset = "/images/green.svg"; >+ >+ return img.decode().then(function(arg) { >+ assert_equals(arg, undefined); >+ }); >+}, document.title + " Image with SVG source decodes with undefined."); >+ >+promise_test(function(t) { >+ var picture = document.createElement("picture"); >+ var source = document.createElement("source"); >+ var img = document.createElement("img"); >+ >+ picture.appendChild(source); >+ picture.appendChild(img); >+ >+ source.srcset = "/non/existent/path.png"; >+ >+ var promise = img.decode(); >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " Non-existent source fails decode."); >+ >+promise_test(function(t) { >+ var picture = document.createElement("picture"); >+ var source = document.createElement("source"); >+ var img = document.createElement("img"); >+ >+ picture.appendChild(source); >+ picture.appendChild(img); >+ >+ source.srcset = "data:image/png;base64,iVBO00PDR0BADBEEF00KGg"; >+ >+ var promise = img.decode(); >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " Corrupt image in src fails decode."); >+ >+promise_test(function(t) { >+ var picture = document.createElement("picture"); >+ var source = document.createElement("source"); >+ var img = document.createElement("img"); >+ >+ picture.appendChild(source); >+ picture.appendChild(img); >+ >+ var promise = img.decode(); >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " Image without srcset fails decode."); >+ >+promise_test(function() { >+ var picture = document.createElement("picture"); >+ var source = document.createElement("source"); >+ var img = document.createElement("img"); >+ >+ picture.appendChild(source); >+ picture.appendChild(img); >+ >+ source.srcset = "/images/green.png"; >+ >+ var first_promise = img.decode(); >+ var second_promise = img.decode(); >+ assert_not_equals(first_promise, second_promise); >+ return Promise.all([ >+ first_promise, >+ second_promise >+ ]); >+}, document.title + " Multiple decodes for images with src succeed."); >+ >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-svg.tentative.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-svg.tentative.html >new file mode 100644 >index 00000000000..633b6a87d9d >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-svg.tentative.html >@@ -0,0 +1,128 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<meta name="timeout" content="long"> >+<title>SVGImageElement.prototype.decode(), basic tests.</title> >+<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+ >+<script> >+"use strict"; >+ >+// src tests >+// ------------------- >+promise_test(function() { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', "/images/green.png"); >+ return img.decode().then(function(arg) { >+ assert_equals(arg, undefined); >+ }); >+}, document.title + " Image with PNG xlink:href decodes with undefined."); >+ >+promise_test(function() { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttribute('href', "/images/green.png"); >+ return img.decode().then(function(arg) { >+ assert_equals(arg, undefined); >+ }); >+}, document.title + " Image with PNG href decodes with undefined."); >+ >+promise_test(function() { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', >+ "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAA" + >+ "D91JpzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QUSEioKsyAgyw" + >+ "AAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAWSURBVA" + >+ "jXY9y3bx8DAwPL58+fGRgYACktBRltLfebAAAAAElFTkSuQmCC"); >+ return img.decode().then(function(arg) { >+ assert_equals(arg, undefined); >+ }); >+}, document.title + " Image with PNG data URL xlink:href decodes with undefined."); >+ >+promise_test(function() { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttribute('href', >+ "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAA" + >+ "D91JpzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QUSEioKsyAgyw" + >+ "AAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAWSURBVA" + >+ "jXY9y3bx8DAwPL58+fGRgYACktBRltLfebAAAAAElFTkSuQmCC"); >+ return img.decode().then(function(arg) { >+ assert_equals(arg, undefined); >+ }); >+}, document.title + " Image with PNG data URL href decodes with undefined."); >+ >+promise_test(function() { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', "/images/green.svg"); >+ return img.decode().then(function(arg) { >+ assert_equals(arg, undefined); >+ }); >+}, document.title + " Image with SVG xlink:href decodes with undefined."); >+ >+promise_test(function() { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttribute('href', "/images/green.svg"); >+ return img.decode().then(function(arg) { >+ assert_equals(arg, undefined); >+ }); >+}, document.title + " Image with SVG href decodes with undefined."); >+ >+promise_test(function(t) { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', "/non/existent/path.png"); >+ var promise = img.decode(); >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " Non-existent xlink:href fails decode."); >+ >+promise_test(function(t) { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttribute('href', "/non/existent/path.png"); >+ var promise = img.decode(); >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " Non-existent href fails decode."); >+ >+promise_test(function(t) { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', "data:image/png;base64,iVBO00PDR0BADBEEF00KGg"); >+ var promise = img.decode(); >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " Corrupt image in xlink:href fails decode."); >+ >+promise_test(function(t) { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttribute('href', "data:image/png;base64,iVBO00PDR0BADBEEF00KGg"); >+ var promise = img.decode(); >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " Corrupt image in href fails decode."); >+ >+promise_test(function(t) { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ var promise = img.decode(); >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " Image without xlink:href or href fails decode."); >+ >+promise_test(function() { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', "/images/green.png"); >+ var first_promise = img.decode(); >+ var second_promise = img.decode(); >+ assert_not_equals(first_promise, second_promise); >+ return Promise.all([ >+ first_promise, >+ second_promise >+ ]); >+}, document.title + " Multiple decodes with a xlink:href succeed."); >+ >+promise_test(function() { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttribute('href', "/images/green.png"); >+ var first_promise = img.decode(); >+ var second_promise = img.decode(); >+ assert_not_equals(first_promise, second_promise); >+ return Promise.all([ >+ first_promise, >+ second_promise >+ ]); >+}, document.title + " Multiple decodes with a href succeed."); >+ >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach-svg.tentative.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach-svg.tentative.html >new file mode 100644 >index 00000000000..0fc49e60360 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach-svg.tentative.html >@@ -0,0 +1,23 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<meta name="timeout" content="long"> >+<title>SVGImageElement.prototype.decode(), attach to DOM before promise resolves.</title> >+<link rel=help href="https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-decode"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<svg></svg> >+<script> >+"use strict"; >+ >+promise_test(function() { >+ var img = document.createElementNS('http://www.w3.org/2000/svg', 'image'); >+ img.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', "/images/green.png"); >+ const promise = img.decode().then(function(arg) { >+ assert_equals(arg, undefined); >+ }); >+ // Don't wait for the promise to resolve before attaching the image. >+ // The promise should still resolve successfully. >+ document.querySelector('svg').appendChild(img); >+ return promise; >+}, document.title); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html >new file mode 100644 >index 00000000000..be680da619e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html >@@ -0,0 +1,26 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<meta name="timeout" content="long"> >+<title>HTMLImageElement.prototype.decode(), attach to DOM before promise resolves.</title> >+<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> >+<link rel=help href="https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-decode"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+ >+<body></body> >+ >+<script> >+"use strict"; >+ >+promise_test(function() { >+ const img = new Image(); >+ img.src = "/images/green.png"; >+ const promise = img.decode().then(function(arg) { >+ assert_equals(arg, undefined); >+ }); >+ // Don't wait for the promise to resolve before attaching the image. >+ // The promise should still resolve successfully. >+ document.body.appendChild(img); >+ return promise; >+}, document.title); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode.html >new file mode 100644 >index 00000000000..a296775c10d >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode.html >@@ -0,0 +1,138 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<meta name="timeout" content="long"> >+<title>HTMLImageElement.prototype.decode(), basic tests.</title> >+<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> >+<link rel=help href="https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-decode"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+ >+<script> >+"use strict"; >+ >+// src tests >+// ------------------- >+promise_test(function() { >+ var img = new Image(); >+ img.src = "/images/green.png"; >+ return img.decode().then(function(arg) { >+ assert_equals(arg, undefined); >+ }); >+}, document.title + " Image with PNG src decodes with undefined."); >+ >+promise_test(function() { >+ var img = new Image(); >+ img.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAA" + >+ "D91JpzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QUSEioKsyAgyw" + >+ "AAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAWSURBVA" + >+ "jXY9y3bx8DAwPL58+fGRgYACktBRltLfebAAAAAElFTkSuQmCC"; >+ return img.decode().then(function(arg) { >+ assert_equals(arg, undefined); >+ }); >+}, document.title + " Image with PNG data URL src decodes with undefined."); >+ >+promise_test(function() { >+ var img = new Image(); >+ img.src = "/images/green.svg"; >+ return img.decode().then(function(arg) { >+ assert_equals(arg, undefined); >+ }); >+}, document.title + " Image with SVG src decodes with undefined."); >+ >+promise_test(function(t) { >+ var img = new Image(); >+ img.src = "/non/existent/path.png"; >+ var promise = img.decode(); >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " Non-existent src fails decode."); >+ >+promise_test(function(t) { >+ var inactive_doc = document.implementation.createHTMLDocument(); >+ var img = inactive_doc.createElement("img"); >+ img.src = "/images/green.png"; >+ var promise = img.decode(); >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " Inactive document fails decode."); >+ >+promise_test(function(t) { >+ var inactive_doc = document.implementation.createHTMLDocument(); >+ var img = document.createElement("img"); >+ img.src = "/images/green.png"; >+ var promise = img.decode(); >+ inactive_doc.body.appendChild(img); >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " Adopted active image into inactive document fails decode."); >+ >+promise_test(function() { >+ var inactive_doc = document.implementation.createHTMLDocument(); >+ var img = inactive_doc.createElement("img"); >+ img.src = "/images/green.png"; >+ document.body.appendChild(img); >+ return img.decode().then(function(arg) { >+ assert_equals(arg, undefined); >+ }); >+}, document.title + " Adopted inactive image into active document succeeds."); >+ >+promise_test(function(t) { >+ var img = new Image(); >+ img.src = "data:image/png;base64,iVBO00PDR0BADBEEF00KGg"; >+ var promise = img.decode(); >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " Corrupt image in src fails decode."); >+ >+promise_test(function(t) { >+ var img = new Image(); >+ var promise = img.decode(); >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " Image without src/srcset fails decode."); >+ >+promise_test(function() { >+ var img = new Image(); >+ img.src = "/images/green.png"; >+ var first_promise = img.decode(); >+ var second_promise = img.decode(); >+ assert_not_equals(first_promise, second_promise); >+ return Promise.all([ >+ first_promise, >+ second_promise >+ ]); >+}, document.title + " Multiple decodes for images with src succeed."); >+ >+// srcset tests >+// ------------------- >+promise_test(function() { >+ var img = new Image(); >+ img.srcset = "/images/green.png 100w"; >+ return img.decode().then(function(arg) { >+ assert_equals(arg, undefined); >+ }); >+}, document.title + " Image with PNG srcset decodes with undefined."); >+ >+promise_test(function() { >+ var img = new Image(); >+ img.srcset = "/images/green.svg 100w"; >+ return img.decode().then(function(arg) { >+ assert_equals(arg, undefined); >+ }); >+}, document.title + " Image with SVG srcset decodes with undefined."); >+ >+promise_test(function(t) { >+ var img = new Image(); >+ img.srcset = "/non/existent/path.png 100w"; >+ var promise = img.decode(); >+ return promise_rejects(t, "EncodingError", promise); >+}, document.title + " Non-existent srcset fails decode."); >+ >+promise_test(function() { >+ var img = new Image(); >+ img.srcset = "/images/green.png 100w"; >+ var first_promise = img.decode(); >+ var second_promise = img.decode(); >+ assert_not_equals(first_promise, second_promise); >+ return Promise.all([ >+ first_promise, >+ second_promise >+ ]); >+}, document.title + " Multiple decodes for images with srcset succeed."); >+ >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/w3c-import.log >new file mode 100644 >index 00000000000..884f7b45463 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/w3c-import.log >@@ -0,0 +1,24 @@ >+The tests in this directory were imported from the W3C repository. >+Do NOT modify these tests directly in WebKit. >+Instead, create a pull request on the WPT github: >+ https://github.com/web-platform-tests/wpt >+ >+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport >+ >+Do NOT modify or remove this file. >+ >+------------------------------------------------------------------------ >+Properties requiring vendor prefixes: >+None >+Property values requiring vendor prefixes: >+None >+------------------------------------------------------------------------ >+List of files: >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-iframe.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes-svg.tentative.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-picture.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-svg.tentative.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach-svg.tentative.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html >index 21624712cf9..f6ae65708c6 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html >@@ -39,7 +39,7 @@ onload = function() { > var expected = {wide:resolve(img.dataset.wide), narrow:resolve(img.dataset.narrow)}; > var current = iframe.className; > var next = current === 'wide' ? 'narrow' : 'wide'; >- var expect_change = expected[next].indexOf('broken.png') !== 0 && !('noChange' in img.dataset); >+ var expect_change = expected[next].indexOf('broken.png') === -1 && !('noChange' in img.dataset); > > test(function() { > assert_equals(img.currentSrc, expected[current]); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/w3c-import.log >index b92218328a0..5aa0db6ca2a 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/img.complete.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/img.complete.html >index 771b8e1b80e..42113cdd2ff 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/img.complete.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/img.complete.html >@@ -11,6 +11,7 @@ > <img src="" id="imgTestTag2"> > <img id="imgTestTag3" style="width: 80px; height:auto;"> > <img id="imgTestTag4"> >+<img id="imgTestTag5"> > > <script> > var imageInstance = document.createElement('img'); >@@ -23,11 +24,11 @@ > <script> > test(function() { > assert_true(document.getElementById("imgTestTag").complete); >- }, "img src omitted"); >+ }, "img src and srcset omitted"); > > test(function() { > assert_true(document.getElementById("imgTestTag2").complete); >- }, "img src empty"); >+ }, "img src and srcset empty"); > > // test if set to true after img is completely available > var t = async_test("async src complete test"); >@@ -38,8 +39,9 @@ > assert_false(loaded); > loaded = true; > assert_true(document.getElementById("imgTestTag3").complete); >- var currentSrc = document.getElementById("imgTestTag3").currentSrc >- assert_equals(new URL(window.location.origin + "/" + currentSrc).pathname, "/3.jpg"); >+ var currentSrc = document.getElementById("imgTestTag3").currentSrc; >+ var expectedUrl = new URL("3.jpg", window.location); >+ assert_equals(new URL(currentSrc).pathname, expectedUrl.pathname); > }, "Only one onload, despite setting the src twice"); > > document.getElementById("imgTestTag3").src = 'test' + Math.random(); >@@ -49,6 +51,22 @@ > document.getElementById("imgTestTag3").src = '3.jpg?nocache=' + Math.random(); > }); > >+ var t1 = async_test("async srcset complete test"); >+ t1.step(function(){ >+ var loaded = false; >+ document.getElementById("imgTestTag5").onload = t1.step_func_done(function(){ >+ assert_false(loaded); >+ loaded = true; >+ assert_true(document.getElementById("imgTestTag5").complete); >+ }, "Only one onload, despite setting the srcset twice"); >+ //Test if src, srcset is omitted >+ assert_true(document.getElementById("imgTestTag5").complete) >+ document.getElementById("imgTestTag5").srcset = "/images/green-256x256.png 1x"; >+ //test if img.complete is set to false if srcset is present >+ assert_false(document.getElementById("imgTestTag5").complete, "srcset present, should be set to false"); >+ //change src again, should make only one request as per 'await stable state' >+ document.getElementById("imgTestTag5").srcset="/images/green-256x256.png 1.6x" >+ }); > > // https://html.spec.whatwg.org/multipage/multipage/embedded-content-1.html#update-the-image-data > // says to "await a stable state" before fetching so we use a separate <script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/intrinsicsize-with-responsive-images.tentative.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/intrinsicsize-with-responsive-images.tentative.html >new file mode 100644 >index 00000000000..739765c0d44 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/intrinsicsize-with-responsive-images.tentative.html >@@ -0,0 +1,96 @@ >+<!DOCTYPE html> >+<body> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+'use strict'; >+ >+const srcs = [ >+ "/images/green.svg", >+ "/images/green.png", >+]; >+ >+for (var src of srcs) { >+ async_test(t => { >+ var img = document.createElement('IMG'); >+ img.intrinsicSize = '400 x 500'; >+ var expected_intrinsic_width = 400; >+ var expected_intrinsic_height = 500; >+ var expected_width = expected_intrinsic_width; >+ var expected_height = expected_intrinsic_height; >+ >+ document.body.appendChild(img); >+ img.addEventListener('load', t.step_func(() => { >+ assert_equals(img.width, expected_width, 'width'); >+ assert_equals(img.height, expected_height, 'height'); >+ assert_equals(img.naturalWidth, expected_intrinsic_width, 'naturalWidth'); >+ assert_equals(img.naturalHeight, expected_intrinsic_height, 'naturalHeigh'); >+ t.done(); >+ })); >+ img.srcset = src + ' 3x'; >+ }, 'Test image ' + src + ' with no specified sizes, width, or height'); >+ >+ async_test(t => { >+ var img = document.createElement('IMG'); >+ img.intrinsicSize = '400 x 500'; >+ img.width = '800'; /* 2x of intrinsic width */ >+ var expected_intrinsic_width = 400; >+ var expected_intrinsic_height = 500; >+ var expected_width = expected_intrinsic_width * 2; >+ var expected_height = expected_intrinsic_height * 2; >+ >+ document.body.appendChild(img); >+ img.addEventListener('load', t.step_func(() => { >+ assert_equals(img.width, expected_width, 'width'); >+ assert_equals(img.height, expected_height, 'height'); >+ assert_equals(img.naturalWidth, expected_intrinsic_width, 'naturalWidth'); >+ assert_equals(img.naturalHeight, expected_intrinsic_height, 'naturalHeigh'); >+ t.done(); >+ })); >+ img.srcset = src + ' 3x'; >+ }, 'Test image ' + src + ' with width = 800, no specified sizes, or height'); >+ >+ async_test(t => { >+ var img = document.createElement('IMG'); >+ img.intrinsicSize = '400 x 500'; >+ img.width = '800'; >+ img.style = 'height:800px;'; >+ var expected_intrinsic_width = 400; >+ var expected_intrinsic_height = 500; >+ var expected_width = 800; >+ var expected_height = 800; >+ >+ document.body.appendChild(img); >+ img.addEventListener('load', t.step_func(() => { >+ assert_equals(img.width, expected_width, 'width'); >+ assert_equals(img.height, expected_height, 'height'); >+ assert_equals(img.naturalWidth, expected_intrinsic_width, 'naturalWidth'); >+ assert_equals(img.naturalHeight, expected_intrinsic_height, 'naturalHeigh'); >+ t.done(); >+ })); >+ img.srcset = src + ' 3x'; >+ }, 'Test image ' + src + ' with width = 800, height = 800, and no specified sizes'); >+} >+ >+async_test(t => { >+ var img = document.createElement('IMG'); >+ img.intrinsicSize = '400 x 500'; >+ img.sizes = '100px'; >+ var expected_intrinsic_width = 100; >+ var expected_intrinsic_height = 125; >+ var expected_width = 100; >+ var expected_height = 125; >+ >+ document.body.appendChild(img); >+ img.addEventListener('load', t.step_func(() => { >+ assert_equals(img.width, expected_width, 'width'); >+ assert_equals(img.height, expected_height, 'height'); >+ assert_equals(img.naturalWidth, expected_intrinsic_width, 'naturalWidth'); >+ assert_equals(img.naturalHeight, expected_intrinsic_height, 'naturalHeigh'); >+ t.done(); >+ })); >+ img.srcset = '/images/background.png 32w'; >+}, 'Test image (32 x 32) with sizes = 100 and srcset descriptor = 32w'); >+ >+</script> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html >new file mode 100644 >index 00000000000..4192e567fcc >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html >@@ -0,0 +1,66 @@ >+<!DOCTYPE html> >+<body> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+'use strict'; >+ >+const srcs = [ >+ "/images/green.svg", >+ "/images/green.png", >+]; >+ >+// Set new attribute, and wait til the media element is repainted. >+function updateAttribute(e, attribute, value) { >+ return new Promise(resolve => { >+ requestAnimationFrame(() => requestAnimationFrame(() => resolve())); >+ e.setAttribute(attribute, value); >+ }); >+} >+ >+for (var src of srcs) { >+ promise_test(async() => { >+ var img = document.createElement('IMG'); >+ document.body.appendChild(img); >+ img.src = src; >+ await new Promise(resolve => >+ img.addEventListener('load', () => resolve(), {once: true})); >+ await updateAttribute(img, 'intrinsicSize', '400 x 500'); >+ assert_equals(img.width, 400, 'width'); >+ assert_equals(img.height, 500, 'height'); >+ assert_equals(img.naturalWidth, 400, 'naturalWidth'); >+ assert_equals(img.naturalHeight, 500, 'naturalHeight'); >+ >+ await updateAttribute(img, 'width', '800'); >+ assert_equals(img.width, 800, 'width'); >+ assert_equals(img.height, 1000, 'height'); >+ assert_equals(img.naturalWidth, 400, 'naturalWidth'); >+ assert_equals(img.naturalHeight, 500, 'naturalHeight'); >+ >+ await updateAttribute(img, 'style', 'height:800px;'); >+ assert_equals(img.width, 800, 'width'); >+ assert_equals(img.height, 800, 'height'); >+ assert_equals(img.naturalWidth, 400, 'naturalWidth'); >+ assert_equals(img.naturalHeight, 500, 'naturalHeight'); >+ >+ await updateAttribute(img, 'width', ''); >+ assert_equals(img.width, 640, 'width'); >+ assert_equals(img.height, 800, 'height'); >+ assert_equals(img.naturalWidth, 400, 'naturalWidth'); >+ assert_equals(img.naturalHeight, 500, 'naturalHeight'); >+ >+ await updateAttribute(img, 'style', 'height:800px; writing-mode: vertical-rl;'); >+ assert_equals(img.width, 640, 'width'); >+ assert_equals(img.height, 800, 'height'); >+ assert_equals(img.naturalWidth, 400, 'naturalWidth'); >+ assert_equals(img.naturalHeight, 500, 'naturalHeight'); >+ >+ await updateAttribute(img, 'style', 'height:800px; writing-mode: horizontal-tb;'); >+ assert_equals(img.width, 640, 'width'); >+ assert_equals(img.height, 800, 'height'); >+ assert_equals(img.naturalWidth, 400, 'naturalWidth'); >+ assert_equals(img.naturalHeight, 500, 'naturalHeight'); >+ }, 'Test intrinsicsize for html image element, src=' + src); >+} >+</script> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html.headers b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html.headers >new file mode 100644 >index 00000000000..4fbf3f5addd >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html.headers >@@ -0,0 +1 @@ >+Feature-Policy: unsized-media * >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/w3c-import.log >new file mode 100644 >index 00000000000..f753c564249 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/w3c-import.log >@@ -0,0 +1,19 @@ >+The tests in this directory were imported from the W3C repository. >+Do NOT modify these tests directly in WebKit. >+Instead, create a pull request on the WPT github: >+ https://github.com/web-platform-tests/wpt >+ >+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport >+ >+Do NOT modify or remove this file. >+ >+------------------------------------------------------------------------ >+Properties requiring vendor prefixes: >+None >+Property values requiring vendor prefixes: >+None >+------------------------------------------------------------------------ >+List of files: >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/intrinsicsize-with-responsive-images.tentative.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html.headers >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/invalid-src.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/invalid-src.html >index f1fbe34c596..49e956565cc 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/invalid-src.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/invalid-src.html >@@ -8,7 +8,7 @@ > <script> > async_test(function(t) { > var img = document.getElementById("brokenurl"); >- img.src = "http://also a broken url"; >+ img.src = "http://["; > var errorevent = false; > > // The errors should be queued in the event loop, so they should only trigger >@@ -17,7 +17,7 @@ async_test(function(t) { > img.addEventListener('loadend', t.step_func_done(function() { > assert_true(errorevent, "error event fired"); > })); >-}, 'src="http://also a broken url"'); >+}, 'src="http://["'); > > async_test(function(t) { > var img = document.getElementById("emptysrc"); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/ismap/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/ismap/w3c-import.log >index f38793383f8..1e1d4c9a58b 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/ismap/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/ismap/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/null-image-source.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/null-image-source.html >new file mode 100644 >index 00000000000..89992765036 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/null-image-source.html >@@ -0,0 +1,30 @@ >+<!doctype html> >+<meta charset="utf-8"> >+<title>Null image source check for src, srcset and picture parent</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<img id="src_id" src=""> >+<img id="srcset_id" srcset=""> >+<picture><img id="parent_picture_id"></picture> >+<script> >+async_test(function(t) { >+ img = document.getElementById('src_id'); >+ img.onerror = t.step_func(function(e) { >+ assert_equals(e.type, "error", "null image source check failed"); >+ t.done(); >+ }); >+}, "img with empty src"); >+ >+async_test(function(t) { >+ img = document.getElementById('srcset_id'); >+ img.onerror = t.unreached_func("empty srcset fires an error"); >+ t.step_timeout(function() { t.done(); }, 2000); >+}, "img with empty srcset"); >+ >+async_test(function(t) { >+ img = document.getElementById('parent_picture_id'); >+ img.onerror = t.unreached_func("null img with picture parent fires an error"); >+ t.step_timeout(function() { t.done(); }, 2000); >+}, "img with picture parent"); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html >new file mode 100644 >index 00000000000..c8e09e8d0b8 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html >@@ -0,0 +1,416 @@ >+<!doctype html> >+<title>img relevant mutations</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+ >+<!-- should invoke update the image data --> >+ >+<img data-desc="src set"> >+<img src="/images/green-2x2.png" data-desc="src changed"> >+<img src="/images/green-2x2.png" data-desc="src removed"> >+ >+<img data-desc="srcset set"> >+<img srcset="/images/green-2x2.png" data-desc="srcset changed"> >+<img srcset="/images/green-2x2.png" data-desc="srcset removed"> >+ >+<img data-desc="sizes set"> >+<img sizes="" data-desc="sizes changed"> >+<img sizes="" data-desc="sizes removed"> >+ >+<img src="/images/green-2x2.png" data-desc="src set to same value"> >+ >+<img data-desc="crossorigin absent to empty"> >+<img data-desc="crossorigin absent to anonymous"> >+<img data-desc="crossorigin absent to use-credentials"> >+<img crossorigin data-desc="crossorigin empty to absent"> >+<img crossorigin data-desc="crossorigin empty to use-credentials"> >+<img crossorigin=anonymous data-desc="crossorigin anonymous to absent"> >+<img crossorigin=anonymous data-desc="crossorigin anonymous to use-credentials"> >+<img crossorigin=use-credentials data-desc="crossorigin use-credentials to absent"> >+<img crossorigin=use-credentials data-desc="crossorigin use-credentials to empty"> >+<img crossorigin=use-credentials data-desc="crossorigin use-credentials to anonymous"> >+ >+<img src="/images/green-2x2.png" data-desc="inserted into picture"><picture></picture> >+ >+<picture><img src="/images/green-2x2.png" data-desc="removed from picture"></picture> >+ >+<picture><img src="/images/green-2x2.png" data-desc="parent is picture, previous source inserted"></picture> >+ >+<picture><source><img src="/images/green-2x2.png" data-desc="parent is picture, previous source removed"></picture> >+ >+<picture><source><img src="/images/green-2x2.png" data-desc="parent is picture, previous source has srcset set"></picture> >+<picture><source srcset=""><img src="/images/green-2x2.png" data-desc="parent is picture, previous source has srcset changed"></picture> >+<picture><source srcset=""><img src="/images/green-2x2.png" data-desc="parent is picture, previous source has srcset removed"></picture> >+ >+<picture><source><img src="/images/green-2x2.png" data-desc="parent is picture, previous source has sizes set"></picture> >+<picture><source sizes=""><img src="/images/green-2x2.png" data-desc="parent is picture, previous source has sizes changed"></picture> >+<picture><source sizes=""><img src="/images/green-2x2.png" data-desc="parent is picture, previous source has sizes removed"></picture> >+ >+<picture><source><img src="/images/green-2x2.png" data-desc="parent is picture, previous source has media set"></picture> >+<picture><source media=""><img src="/images/green-2x2.png" data-desc="parent is picture, previous source has media changed"></picture> >+<picture><source media=""><img src="/images/green-2x2.png" data-desc="parent is picture, previous source has media removed"></picture> >+ >+<picture><source><img src="/images/green-2x2.png" data-desc="parent is picture, previous source has type set"></picture> >+<picture><source type=""><img src="/images/green-2x2.png" data-desc="parent is picture, previous source has type changed"></picture> >+<picture><source type=""><img src="/images/green-2x2.png" data-desc="parent is picture, previous source has type removed"></picture> >+ >+<!-- should not invoke update the image data --> >+ >+<img srcset="/images/green-2x2.png" data-desc="srcset is set to same value"> >+<img srcset="/images/green-2x2.png" sizes data-desc="sizes is set to same value"> >+ >+<img src="/images/green-2x2.png" data-desc="crossorigin state not changed: absent, removeAttribute"> >+<img src="/images/green-2x2.png" crossorigin data-desc="crossorigin state not changed: empty to anonymous"> >+<img src="/images/green-2x2.png" crossorigin=anonymous data-desc="crossorigin state not changed: anonymous to foobar"> >+<img src="/images/green-2x2.png" crossorigin=use-credentials data-desc="crossorigin state not changed: use-credentials to USE-CREDENTIALS"> >+ >+<img src="/images/green-2x2.png" data-desc="inserted into picture ancestor"><picture><span></span></picture> >+<picture><span><img src="/images/green-2x2.png" data-desc="removed from picture ancestor"></span></picture> >+ >+<picture><span><img src="/images/green-2x2.png" data-desc="ancestor picture has a source inserted"></span></picture> >+<picture><source><span><img src="/images/green-2x2.png" data-desc="ancestor picture has a source removed"></span></picture> >+ >+<picture><span><img src="/images/green-2x2.png" data-desc="ancestor picture; previous sibling source inserted"></span></picture> >+<picture><span><source><img src="/images/green-2x2.png" data-desc="ancestor picture; previous sibling source removed"></span></picture> >+ >+<picture><img src="/images/green-2x2.png" data-desc="parent is picture, following sibling source inserted"></picture> >+<picture><img src="/images/green-2x2.png" data-desc="parent is picture, following sibling source removed"><source></picture> >+ >+<picture><img src="/images/green-2x2.png" data-desc="parent is picture, following sibling source has srcset set"><source></picture> >+ >+<img src="/images/green-2x2.png" data-desc="media on img set"> >+<img src="/images/green-2x2.png" data-desc="type on img set"> >+<img src="/images/green-2x2.png" data-desc="class on img set"> >+<img src="/images/green-2x2.png" data-desc="alt on img set"> >+ >+<picture><source><img src="/images/green-2x2.png" data-desc="src on previous sibling source set"></picture> >+<picture><source><img src="/images/green-2x2.png" data-desc="class on previous sibling source set"></picture> >+ >+<img src="/images/green-2x2.png" data-desc="inserted/removed children of img"> >+ >+<picture><img src="/images/green-2x2.png" data-desc="picture is inserted; img has src"></picture><span></span> >+<picture><img srcset="/images/green-2x2.png" data-desc="picture is inserted; img has srcset"></picture><span></span> >+<picture><source srcset="/images/green-2x2.png"><img src="/images/green-2x2.png" data-desc="picture is inserted; img has previous sibling source"></picture><span></span> >+<picture><img src="/images/green-2x2.png" data-desc="picture is inserted; img has following sibling source"><source srcset="/images/green-2x2.png"></picture><span></span> >+ >+<picture><img src="/images/green-2x2.png" data-desc="picture is removed; img has src"></picture> >+<picture><img srcset="/images/green-2x2.png" data-desc="picture is removed; img has srcset"></picture> >+<picture><source srcset="/images/green-2x2.png"><img src="/images/green-2x2.png" data-desc="picture is removed; img has previous sibling source"></picture> >+<picture><img src="/images/green-2x2.png" data-desc="picture is removed; img has following sibling source"><source srcset="/images/green-2x2.png"></picture> >+ >+<picture><img src="/images/green-2x2.png" data-desc="parent is picture, following img inserted"></picture> >+<picture><img src="/images/green-2x2.png" data-desc="parent is picture, following img removed"><img></picture> >+<picture><img src="/images/green-2x2.png" data-desc="parent is picture, following img has src set"><img></picture> >+<picture><img src="/images/green-2x2.png" data-desc="parent is picture, following img has srcset set"><img></picture> >+<picture><img src="/images/green-2x2.png" data-desc="parent is picture, following img has sizes set"><img></picture> >+ >+ >+<script> >+setup({explicit_done:true}); >+ >+function t(desc, func, expect) { >+ async_test(function() { >+ var img = document.querySelector('[data-desc="' + desc + '"]'); >+ img.onload = img.onerror = this.unreached_func('update the image data was run'); >+ if (expect == 'timeout') { >+ setTimeout(this.step_func_done(), 1000); >+ } else { >+ img['on' + expect] = this.step_func_done(function() {}); >+ } >+ func.call(this, img); >+ }, desc); >+} >+ >+onload = function() { >+ >+ t('src set', function(img) { >+ img.src = '/images/green-2x2.png'; >+ }, 'load'); >+ >+ t('src changed', function(img) { >+ img.src = '/images/green-2x2.png '; >+ }, 'load'); >+ >+ t('src removed', function(img) { >+ img.removeAttribute('src'); >+ }, 'timeout'); >+ >+ t('srcset set', function(img) { >+ img.srcset = '/images/green-2x2.png'; >+ }, 'load'); >+ >+ t('srcset changed', function(img) { >+ img.srcset = '/images/green-2x2.png '; >+ }, 'load'); >+ >+ t('srcset removed', function(img) { >+ img.removeAttribute('srcset'); >+ }, 'timeout'); >+ >+ t('sizes set', function(img) { >+ img.sizes = ''; >+ }, 'timeout'); >+ >+ t('sizes changed', function(img) { >+ img.sizes = ' '; >+ }, 'timeout'); >+ >+ t('sizes removed', function(img) { >+ img.removeAttribute('sizes'); >+ }, 'timeout'); >+ >+ t('src set to same value', function(img) { >+ img.src = '/images/green-2x2.png'; >+ }, 'load'); >+ >+ t('crossorigin absent to empty', function(img) { >+ img.crossOrigin = ''; >+ }, 'timeout'); >+ >+ t('crossorigin absent to anonymous', function(img) { >+ img.crossOrigin = 'anonymous'; >+ }, 'timeout'); >+ >+ t('crossorigin absent to use-credentials', function(img) { >+ img.crossOrigin = 'use-credentials'; >+ }, 'timeout'); >+ >+ t('crossorigin empty to absent', function(img) { >+ img.removeAttribute('crossorigin'); >+ }, 'timeout'); >+ >+ t('crossorigin empty to use-credentials', function(img) { >+ img.crossOrigin = 'use-credentials'; >+ }, 'timeout'); >+ >+ t('crossorigin anonymous to absent', function(img) { >+ img.removeAttribute('crossorigin'); >+ }, 'timeout'); >+ >+ t('crossorigin anonymous to use-credentials', function(img) { >+ img.crossOrigin = 'use-credentials'; >+ }, 'timeout'); >+ >+ t('crossorigin use-credentials to absent', function(img) { >+ img.removeAttribute('crossorigin'); >+ }, 'timeout'); >+ >+ t('crossorigin use-credentials to empty', function(img) { >+ img.crossOrigin = ''; >+ }, 'timeout'); >+ >+ t('crossorigin use-credentials to anonymous', function(img) { >+ img.crossOrigin = 'anonymous'; >+ }, 'timeout'); >+ >+ t('inserted into picture', function(img) { >+ img.nextSibling.appendChild(img); >+ }, 'load'); >+ >+ t('removed from picture', function(img) { >+ img.parentNode.removeChild(img); >+ }, 'load'); >+ >+ t('parent is picture, previous source inserted', function(img) { >+ img.parentNode.insertBefore(document.createElement('source'), img); >+ }, 'load'); >+ >+ t('parent is picture, previous source removed', function(img) { >+ img.parentNode.removeChild(img.previousSibling); >+ }, 'load'); >+ >+ t('parent is picture, previous source has srcset set', function(img) { >+ img.previousSibling.srcset = ''; >+ }, 'load'); >+ >+ t('parent is picture, previous source has srcset changed', function(img) { >+ img.previousSibling.srcset = ' '; >+ }, 'load'); >+ >+ t('parent is picture, previous source has srcset removed', function(img) { >+ img.previousSibling.removeAttribute('srcset'); >+ }, 'load'); >+ >+ t('parent is picture, previous source has sizes set', function(img) { >+ img.previousSibling.sizes = ''; >+ }, 'load'); >+ >+ t('parent is picture, previous source has sizes changed', function(img) { >+ img.previousSibling.sizes = ' '; >+ }, 'load'); >+ >+ t('parent is picture, previous source has sizes removed', function(img) { >+ img.previousSibling.removeAttribute('sizes'); >+ }, 'load'); >+ >+ t('parent is picture, previous source has media set', function(img) { >+ img.previousSibling.media = ''; >+ }, 'load'); >+ >+ t('parent is picture, previous source has media changed', function(img) { >+ img.previousSibling.media = ' '; >+ }, 'load'); >+ >+ t('parent is picture, previous source has media removed', function(img) { >+ img.previousSibling.removeAttribute('media'); >+ }, 'load'); >+ >+ t('parent is picture, previous source has type set', function(img) { >+ img.previousSibling.type = ''; >+ }, 'load'); >+ >+ t('parent is picture, previous source has type changed', function(img) { >+ img.previousSibling.type = ' '; >+ }, 'load'); >+ >+ t('parent is picture, previous source has type removed', function(img) { >+ img.previousSibling.removeAttribute('type'); >+ }, 'load'); >+ >+ t('srcset is set to same value', function(img) { >+ img.srcset = "/images/green-2x2.png"; >+ }, 'timeout'); >+ >+ t('sizes is set to same value', function(img) { >+ img.sizes = ''; >+ }, 'timeout'); >+ >+ t('crossorigin state not changed: absent, removeAttribute', function(img) { >+ img.removeAttribute('crossorigin'); >+ }, 'timeout'); >+ >+ t('crossorigin state not changed: empty to anonymous', function(img) { >+ img.crossOrigin = 'anonymous'; >+ }, 'timeout'); >+ >+ t('crossorigin state not changed: anonymous to foobar', function(img) { >+ img.crossOrigin = 'foobar'; >+ }, 'timeout'); >+ >+ t('crossorigin state not changed: use-credentials to USE-CREDENTIALS', function(img) { >+ img.crossOrigin = 'USE-CREDENTIALS'; >+ }, 'timeout'); >+ >+ t('inserted into picture ancestor', function(img) { >+ img.nextSibling.firstChild.appendChild(img); >+ }, 'timeout'); >+ >+ t('removed from picture ancestor', function(img) { >+ img.parentNode.removeChild(img); >+ }, 'timeout'); >+ >+ t('ancestor picture has a source inserted', function(img) { >+ img.parentNode.parentNode.insertBefore(document.createElement('source'), img.parentNode); >+ }, 'timeout'); >+ >+ t('ancestor picture has a source removed', function(img) { >+ img.parentNode.parentNode.removeChild(img.parentNode.previousSibling); >+ }, 'timeout'); >+ >+ t('ancestor picture; previous sibling source inserted', function(img) { >+ img.parentNode.insertBefore(document.createElement('source'), img); >+ }, 'timeout'); >+ >+ t('ancestor picture; previous sibling source removed', function(img) { >+ img.parentNode.removeChild(img.previousSibling); >+ }, 'timeout'); >+ >+ t('parent is picture, following sibling source inserted', function(img) { >+ img.parentNode.appendChild(document.createElement('source')); >+ }, 'timeout'); >+ >+ t('parent is picture, following sibling source removed', function(img) { >+ img.parentNode.removeChild(img.nextSibling); >+ }, 'timeout'); >+ >+ t('parent is picture, following sibling source has srcset set', function(img) { >+ img.nextSibling.srcset = ''; >+ }, 'timeout'); >+ >+ t('media on img set', function(img) { >+ img.setAttribute('media', ''); >+ }, 'timeout'); >+ >+ t('type on img set', function(img) { >+ img.setAttribute('type', ''); >+ }, 'timeout'); >+ >+ t('class on img set', function(img) { >+ img.className = ''; >+ }, 'timeout'); >+ >+ t('alt on img set', function(img) { >+ img.alt = ''; >+ }, 'timeout'); >+ >+ t('src on previous sibling source set', function(img) { >+ img.previousSibling.setAttribute('src', ''); >+ }, 'timeout'); >+ >+ t('class on previous sibling source set', function(img) { >+ img.previousSibling.className = ''; >+ }, 'timeout'); >+ >+ t('inserted/removed children of img', function(img) { >+ img.appendChild(document.createElement('source')); >+ setTimeout(this.step_func(function() { >+ img.removeChild(img.firstChild); >+ }), 0); >+ }, 'timeout'); >+ >+ t('picture is inserted; img has src', function(img) { >+ img.parentNode.nextSibling.appendChild(img.parentNode); >+ }, 'timeout'); >+ >+ t('picture is inserted; img has srcset', function(img) { >+ img.parentNode.nextSibling.appendChild(img.parentNode); >+ }, 'timeout'); >+ >+ t('picture is inserted; img has previous sibling source', function(img) { >+ img.parentNode.nextSibling.appendChild(img.parentNode); >+ }, 'timeout'); >+ >+ t('picture is inserted; img has following sibling source', function(img) { >+ img.parentNode.nextSibling.appendChild(img.parentNode); >+ }, 'timeout'); >+ >+ t('picture is removed; img has src', function(img) { >+ img.parentNode.parentNode.removeChild(img.parentNode); >+ }, 'timeout'); >+ >+ t('picture is removed; img has srcset', function(img) { >+ img.parentNode.parentNode.removeChild(img.parentNode); >+ }, 'timeout'); >+ >+ t('picture is removed; img has previous sibling source', function(img) { >+ img.parentNode.parentNode.removeChild(img.parentNode); >+ }, 'timeout'); >+ >+ t('picture is removed; img has following sibling source', function(img) { >+ img.parentNode.parentNode.removeChild(img.parentNode); >+ }, 'timeout'); >+ >+ t('parent is picture, following img inserted', function(img) { >+ img.parentNode.appendChild(document.createElement('img')); >+ }, 'timeout'); >+ >+ t('parent is picture, following img removed', function(img) { >+ img.parentNode.removeChild(img.nextSibling); >+ }, 'timeout'); >+ >+ t('parent is picture, following img has src set', function(img) { >+ img.nextSibling.src = ''; >+ }, 'timeout'); >+ >+ t('parent is picture, following img has srcset set', function(img) { >+ img.nextSibling.srcset = ''; >+ }, 'timeout'); >+ >+ t('parent is picture, following img has sizes set', function(img) { >+ img.nextSibling.sizes = ''; >+ }, 'timeout'); >+ >+ done(); >+}; >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/resources/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/resources/w3c-import.log >index cd01bd931ce..001cc3ef573 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/resources/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/resources/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-display-none.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-display-none.html >new file mode 100644 >index 00000000000..6aa77ebf85b >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-display-none.html >@@ -0,0 +1,7 @@ >+<!doctype html> >+<title>img parse a sizes attribute (display:none)</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<iframe data-desc="display:none" style="width:1000px; height:1000px" src="support/sizes-iframed.sub.html?doctype=doctype%20html&style=display:none"></iframe> >+<script src="support/parse-a-sizes-attribute.js"></script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-quirks-mode.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-quirks-mode.html >new file mode 100644 >index 00000000000..2150192d296 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-quirks-mode.html >@@ -0,0 +1,7 @@ >+<!doctype html> >+<title>img parse a sizes attribute (quirks mode)</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<iframe data-desc="quirks mode" style="width:1000px; height:1000px" src="support/sizes-iframed.sub.html?doctype=----&style="></iframe> >+<script src="support/parse-a-sizes-attribute.js"></script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-standards-mode.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-standards-mode.html >new file mode 100644 >index 00000000000..6e70c88396d >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-standards-mode.html >@@ -0,0 +1,7 @@ >+<!doctype html> >+<title>img parse a sizes attribute (standards mode)</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<iframe data-desc="standards mode" style="width:1000px; height:1000px" src="support/sizes-iframed.sub.html?doctype=doctype%20html&style="></iframe> >+<script src="support/parse-a-sizes-attribute.js"></script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-width-1000px.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-width-1000px.html >new file mode 100644 >index 00000000000..ab3f69e0583 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-width-1000px.html >@@ -0,0 +1,7 @@ >+<!doctype html> >+<title>img parse a sizes attribute (width:1000px)</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<iframe data-desc="width:1000px" style="width:1000px; height:1000px" src="support/sizes-iframed.sub.html?doctype=doctype%20html&style=width:1000px%3B%20height:16px"></iframe> >+<script src="support/parse-a-sizes-attribute.js"></script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html >deleted file mode 100644 >index bd204542081..00000000000 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html >+++ /dev/null >@@ -1,42 +0,0 @@ >-<!doctype html> >-<title>img parse a sizes attribute</title> >-<meta name="timeout" content="long"> >-<script src="/resources/testharness.js"></script> >-<script src="/resources/testharnessreport.js"></script> >-<div id=log></div> >-<iframe data-desc="standards mode" style="width:1000px; height:1000px" src="sizes-iframed.sub.html?doctype=doctype%20html&style="></iframe> >-<iframe data-desc="quirks mode" style="width:1000px; height:1000px" src="sizes-iframed.sub.html?doctype=----&style="></iframe> >-<iframe data-desc="display:none" style="width:1000px; height:1000px" src="sizes-iframed.sub.html?doctype=doctype%20html&style=display:none"></iframe> >-<iframe data-desc="width:1000px" style="width:1000px; height:1000px" src="sizes-iframed.sub.html?doctype=doctype%20html&style=width:1000px%3B%20height:16px"></iframe> >-<script> >-setup({explicit_done:true}); >- >-function check(p, iframe) { >- var current = p.firstElementChild; >- var ref_sizes = current.getAttribute('sizes'); >- var expect = p.firstElementChild.currentSrc; >- if (expect) { >- expect = expect.split('?')[0]; >- } >- while (current = current.nextElementSibling) { >- test(function() { >- if (expect === '' || expect === null || expect === undefined) { >- assert_unreached('ref currentSrc was ' + format_value(expect)); >- } >- var got = current.currentSrc; >- assert_greater_than(got.indexOf('?'), -1, 'expected a "?" in currentSrc'); >- got = got.split('?')[0]; >- assert_equals(got, expect); >- }, current.outerHTML + ' ref sizes=' + format_value(ref_sizes) + ' (' + iframe.getAttribute('data-desc') + ')'); >- } >-} >- >-onload = function() { >- [].forEach.call(document.querySelectorAll('iframe'), function(iframe) { >- [].forEach.call(iframe.contentDocument.querySelectorAll('p'), function(p) { >- check(p, iframe); >- }); >- }); >- done(); >-} >-</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-001-expected.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-001-expected.html >new file mode 100644 >index 00000000000..68466ae94d4 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-001-expected.html >@@ -0,0 +1,4 @@ >+<!doctype html> >+<title>Test reference</title> >+<link rel="author" title="Emilio Cobos Ãlvarez" href="mailto:emilio@crisal.io"> >+<iframe width="500" height="500" srcdoc='<!doctype html><img alt="FAIL" srcset="/images/green-256x256.png 100w" style="max-width: 100%" sizes="10px">'></iframe> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-001.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-001.html >new file mode 100644 >index 00000000000..51f8145bf97 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-001.html >@@ -0,0 +1,20 @@ >+<!doctype html> >+<html class="reftest-wait"> >+<title>Image intrinsic size specified via sizes attribute reacts properly to media changes</title> >+<link rel="author" title="Emilio Cobos Ãlvarez" href="mailto:emilio@crisal.io"> >+<link rel="match" href="sizes-dynamic-001-ref.html"> >+<link rel="help" href="https://html.spec.whatwg.org/#sizes-attributes"> >+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1149357"> >+<script> >+function frameLoaded(frame) { >+ frame.width = "500"; >+ let img = frame.contentDocument.querySelector('img'); >+ >+ // Trigger the viewport resize, which will trigger the image load task. >+ img.offsetWidth; >+ >+ // Wait for the image load task to run. >+ setTimeout(() => document.documentElement.removeAttribute("class"), 0); >+} >+</script> >+<iframe onload="frameLoaded(this)" width="200" height="500" srcdoc='<!doctype html><img srcset="/images/green-256x256.png 100w" style="max-width: 100%" sizes="(min-width: 400px) 10px, 20px">'></iframe> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-002-expected.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-002-expected.html >new file mode 100644 >index 00000000000..68466ae94d4 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-002-expected.html >@@ -0,0 +1,4 @@ >+<!doctype html> >+<title>Test reference</title> >+<link rel="author" title="Emilio Cobos Ãlvarez" href="mailto:emilio@crisal.io"> >+<iframe width="500" height="500" srcdoc='<!doctype html><img alt="FAIL" srcset="/images/green-256x256.png 100w" style="max-width: 100%" sizes="10px">'></iframe> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-002.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-002.html >new file mode 100644 >index 00000000000..6c64b3da392 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-002.html >@@ -0,0 +1,33 @@ >+<!doctype html> >+<html class="reftest-wait"> >+<title>Image intrinsic size specified via sizes attribute reacts properly to media changes in Shadow DOM</title> >+<link rel="author" title="Emilio Cobos Ãlvarez" href="mailto:emilio@crisal.io"> >+<link rel="match" href="sizes-dynamic-001-ref.html"> >+<link rel="help" href="https://html.spec.whatwg.org/#sizes-attributes"> >+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1149357"> >+<script> >+function frameLoaded(frame) { >+ let doc = frame.contentDocument; >+ let shadow = doc.getElementById("host").attachShadow({ mode: "open" }); >+ >+ let img = doc.createElement("img"); >+ img.srcset = "/images/green-256x256.png 100w"; >+ img.style.maxWidth = "100%"; >+ img.setAttribute("sizes", "(min-width: 400px) 10px, 20px"); >+ >+ img.onload = function() { >+ img.offsetWidth; // Flush layout. >+ >+ frame.width = "500"; >+ >+ // Trigger the viewport resize, which will trigger the image load task. >+ img.offsetWidth; >+ >+ // Wait for the image load task to run. >+ setTimeout(() => document.documentElement.removeAttribute("class"), 0); >+ }; >+ >+ shadow.appendChild(img); >+} >+</script> >+<iframe onload="frameLoaded(this)" width="200" height="500" srcdoc='<!doctype html><div id="host"></div>'></iframe> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/support/parse-a-sizes-attribute.js b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/support/parse-a-sizes-attribute.js >new file mode 100644 >index 00000000000..62ad00a4682 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/support/parse-a-sizes-attribute.js >@@ -0,0 +1,29 @@ >+setup({explicit_done:true}); >+ >+function check(p, iframe) { >+ var current = p.firstElementChild; >+ var ref_sizes = current.getAttribute('sizes'); >+ var expect = current.currentSrc; >+ if (expect) { >+ expect = expect.split('?')[0]; >+ } >+ while (current = current.nextElementSibling) { >+ test(function() { >+ if (expect === '' || expect === null || expect === undefined) { >+ assert_unreached('ref currentSrc was ' + format_value(expect)); >+ } >+ var got = current.currentSrc; >+ assert_greater_than(got.indexOf('?'), -1, 'expected a "?" in currentSrc'); >+ got = got.split('?')[0]; >+ assert_equals(got, expect); >+ }, current.outerHTML + ' ref sizes=' + format_value(ref_sizes) + ' (' + iframe.getAttribute('data-desc') + ')'); >+ } >+} >+ >+onload = function() { >+ var iframe = document.querySelector('iframe'); >+ [].forEach.call(iframe.contentDocument.querySelectorAll('p'), function(p) { >+ check(p, iframe); >+ }); >+ done(); >+} >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-iframed.sub.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/support/sizes-iframed.sub.html >similarity index 93% >rename from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-iframed.sub.html >rename to LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/support/sizes-iframed.sub.html >index 925bb46996d..c564a5845d5 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-iframed.sub.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/support/sizes-iframed.sub.html >@@ -52,8 +52,14 @@ > <img srcset='/images/green-1x1.png?e34 50w, /images/green-16x16.png?e34 51w' sizes='\[,1px'> > <img srcset='/images/green-1x1.png?e35 50w, /images/green-16x16.png?e35 51w' sizes='1\p\x'> > <img srcset='/images/green-1x1.png?e36 50w, /images/green-16x16.png?e36 51w' sizes='calc(1px)'> >+<img srcset='/images/green-1x1.png?e36a 50w, /images/green-16x16.png?e36a 51w' sizes='min(1px, 100px)'> >+<img srcset='/images/green-1x1.png?e36b 50w, /images/green-16x16.png?e36b 51w' sizes='min(-100px, 1px)'> > <img srcset='/images/green-1x1.png?e37 50w, /images/green-16x16.png?e37 51w' sizes='(min-width:0) calc(1px)'> >+<img srcset='/images/green-1x1.png?e37a 50w, /images/green-16x16.png?e37a 51w' sizes='(min-width:0) min(1px, 100px)'> >+<img srcset='/images/green-1x1.png?e37b 50w, /images/green-16x16.png?e37b 51w' sizes='(min-width:0) max(-100px, 1px)'> > <img srcset='/images/green-1x1.png?e38 50w, /images/green-16x16.png?e38 51w' sizes='(min-width:calc(0)) 1px'> >+<img srcset='/images/green-1x1.png?e38a 50w, /images/green-16x16.png?e38a 51w' sizes='(min-width:min(0, 200vw)) 1px'> >+<img srcset='/images/green-1x1.png?e38b 50w, /images/green-16x16.png?e38b 51w' sizes='(min-width:max(-200vw, 0)) 1px'> > <img srcset='/images/green-1x1.png?e39 50w, /images/green-16x16.png?e39 51w' sizes='(min-width:0) 1px, 100vw'> > <img srcset='/images/green-1x1.png?e40 50w, /images/green-16x16.png?e40 51w' sizes='(min-width:0) 1px, (min-width:0) 100vw, 100vw'> > <img srcset='/images/green-1x1.png?e41 50w, /images/green-16x16.png?e41 51w' sizes='(min-width:0) 1px'> >@@ -126,7 +132,11 @@ > <img srcset='/images/green-1x1.png?e108 50w, /images/green-16x16.png?e108 51w' sizes='(max-width:0) or (unknown-general-enclosed !) 100vw, 1px'> > <img srcset='/images/green-1x1.png?e109 50w, /images/green-16x16.png?e109 51w' sizes='not ((max-width:0) or (unknown "general-enclosed")) 100vw, 1px'> > <img srcset='/images/green-1x1.png?f48 50w, /images/green-16x16.png?f48 51w' sizes='calc(1px'> >+<img srcset='/images/green-1x1.png?f48a 50w, /images/green-16x16.png?f48a 51w' sizes='min(1px, 200vw'> >+<img srcset='/images/green-1x1.png?f48b 50w, /images/green-16x16.png?f48b 51w' sizes='max(-200vw, 1px'> > <img srcset='/images/green-1x1.png?f49 50w, /images/green-16x16.png?f49 51w' sizes='(min-width:0) calc(1px'> >+<img srcset='/images/green-1x1.png?f49a 50w, /images/green-16x16.png?f49a 51w' sizes='(min-width:0) min(1px, 200vw'> >+<img srcset='/images/green-1x1.png?f49b 50w, /images/green-16x16.png?f49b 51w' sizes='(min-width:0) max(-200vw, 1px'> > > <p> > <img srcset='/images/green-1x1.png?f1 50w, /images/green-16x16.png?f1 51w' sizes='100vw'> >@@ -146,6 +156,7 @@ > <img srcset='/images/green-1x1.png?f15 50w, /images/green-16x16.png?f15 51w' sizes='0.1dpi'> > <img srcset='/images/green-1x1.png?f16 50w, /images/green-16x16.png?f16 51w' sizes='0.1dpcm'> > <img srcset='/images/green-1x1.png?f17 50w, /images/green-16x16.png?f17 51w' sizes='0.1dppx'> >+<img srcset='/images/green-1x1.png?f17a 50w, /images/green-16x16.png?f17a 51w' sizes='0.1x'> > <img srcset='/images/green-1x1.png?f18 50w, /images/green-16x16.png?f18 51w' data-foo='1px' sizes='attr(data-foo, length, 1px)'> > <img srcset='/images/green-1x1.png?f19 50w, /images/green-16x16.png?f19 51w' data-foo='1' sizes='attr(data-foo, px, 1px)'> > <img srcset='/images/green-1x1.png?f20 50w, /images/green-16x16.png?f20 51w' sizes='toggle(1px)'> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/support/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/support/w3c-import.log >new file mode 100644 >index 00000000000..d58deda57ab >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/support/w3c-import.log >@@ -0,0 +1,18 @@ >+The tests in this directory were imported from the W3C repository. >+Do NOT modify these tests directly in WebKit. >+Instead, create a pull request on the WPT github: >+ https://github.com/web-platform-tests/wpt >+ >+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport >+ >+Do NOT modify or remove this file. >+ >+------------------------------------------------------------------------ >+Properties requiring vendor prefixes: >+None >+Property values requiring vendor prefixes: >+None >+------------------------------------------------------------------------ >+List of files: >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/support/parse-a-sizes-attribute.js >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/support/sizes-iframed.sub.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/w3c-import.log >index 6e683bedd2b..2f5c6042510 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >@@ -14,5 +14,11 @@ Property values requiring vendor prefixes: > None > ------------------------------------------------------------------------ > List of files: >-/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html >-/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-iframed.sub.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-display-none.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-quirks-mode.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-standards-mode.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-width-1000px.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-001-expected.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-001.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-002-expected.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-002.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/srcset-media-dynamic.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/srcset-media-dynamic.html >new file mode 100644 >index 00000000000..2cc74e2b8f4 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/srcset-media-dynamic.html >@@ -0,0 +1,25 @@ >+<!doctype html> >+<title>source element in picture handles dynamic media change correctly.</title> >+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Ãlvarez"> >+<link rel="author" href="https://mozilla.org" title="Mozilla"> >+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1523627"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<picture id="pic"> >+ <source srcset="data:,a"> >+</picture> >+<script> >+let t = async_test("Dynamic media change is handled correctly"); >+ >+let pic = document.getElementById("pic"); >+// Something that will never match. >+pic.querySelector("source").setAttribute("media", "not all"); >+ >+let img = document.createElement("img"); >+img.src = "data:,b"; >+pic.appendChild(img); >+ >+onload = t.step_func_done(function() { >+ assert_equals(img.currentSrc, "data:,b"); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/w3c-import.log >index 8d8b1d94d79..fe5a97711dd 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >@@ -17,3 +17,4 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/common.js > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/parse-a-srcset-attribute.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/select-an-image-source.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/srcset-media-dynamic.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-image-data/fail-to-resolve.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-image-data/fail-to-resolve.html >new file mode 100644 >index 00000000000..959ceaa9793 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-image-data/fail-to-resolve.html >@@ -0,0 +1,25 @@ >+<!doctype html> >+<title>img update the image data: fail to resolve URL</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+ >+<img src="//["> >+<img srcset="//["> >+<img srcset="//[" src="/images/red.png"> >+<img srcset="//[, /images/red.png"> >+ >+<script> >+setup({explicit_done: true}); >+ >+var expected = '//['; >+ >+onload = function() { >+ [].forEach.call(document.images, function(img) { >+ test(function() { >+ assert_equals(img.currentSrc, expected); >+ }, img.outerHTML); >+ }); >+ done(); >+}; >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-image-data/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-image-data/w3c-import.log >new file mode 100644 >index 00000000000..b8fc42326e0 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-image-data/w3c-import.log >@@ -0,0 +1,17 @@ >+The tests in this directory were imported from the W3C repository. >+Do NOT modify these tests directly in WebKit. >+Instead, create a pull request on the WPT github: >+ https://github.com/web-platform-tests/wpt >+ >+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport >+ >+Do NOT modify or remove this file. >+ >+------------------------------------------------------------------------ >+Properties requiring vendor prefixes: >+None >+Property values requiring vendor prefixes: >+None >+------------------------------------------------------------------------ >+List of files: >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-image-data/fail-to-resolve.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/w3c-import.log >index 8711f70d920..9c21010cc2b 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >@@ -15,8 +15,13 @@ None > ------------------------------------------------------------------------ > List of files: > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/3.jpg >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/404-response-with-actual-image-data.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/404-response-with-actual-image-data.py > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/Image-constructor.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/adoption.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/available-images-expected.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/available-images-onload.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/available-images.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/brokenimg.jpg > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/contains.json > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/data-url.html >@@ -33,6 +38,8 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/non-active-document.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/nonexistent-image.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/not-rendered-dimension-getter.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/null-image-source.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/update-media.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/update-src-complete.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-source-set.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/document-getters-return-null-for-cross-origin.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/document-getters-return-null-for-cross-origin.html >new file mode 100644 >index 00000000000..3d1077538e2 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/document-getters-return-null-for-cross-origin.html >@@ -0,0 +1,17 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<title>Test that contentDocument/getSVGDocument() return null for a cross-origin document.</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<body> >+<object data='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><rect height="100" width="100"/></svg>'></object> >+<script> >+const object = document.querySelector('object'); >+var t1 = async_test('HTMLObjectElement.contentDocument for cross-origin document'); >+window.addEventListener( >+ 'load', t1.step_func_done(() => { assert_equals(object.contentDocument, null); })); >+var t2 = async_test('HTMLObjectElement.getSVGDocument() for cross-origin document'); >+window.addEventListener( >+ 'load', t2.step_func_done(() => { assert_equals(object.getSVGDocument(), null); })); >+</script> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-events.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-events.html >new file mode 100644 >index 00000000000..4ead6f56b19 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-events.html >@@ -0,0 +1,80 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>HTML Test: object-events</title> >+<link rel="author" title="Intel" href="http://www.intel.com"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+ >+async_test(function(t) { >+ var obj = document.createElement("object"); >+ obj.onerror = t.step_func_done(function(e){ >+ assert_equals(Object.getPrototypeOf(e).constructor, Event, "The error event should use the Event interface."); >+ assert_true(e.isTrusted, "The error event should be a trusted event."); >+ assert_false(e.cancelable, "The error event should not be a cancelable event."); >+ assert_false(e.bubbles, "The error event should not be a bubble event."); >+ assert_equals(e.target, obj, "The error event target should be the corresponding object element."); >+ }); >+ >+ obj.onload = t.step_func_done(function(e){ >+ assert_unreached("The load event should not be fired."); >+ }); >+ >+ obj.data = "file:\\http://nonexistent.html"; >+ document.body.appendChild(obj); >+}, "error event (using 'file:' protocol)"); >+ >+async_test(function(t) { >+ var obj = document.createElement("object"); >+ obj.onerror = t.step_func_done(function(e){ >+ assert_equals(e.target, obj, >+ "The error event should be fired on our element"); >+ }); >+ obj.onload = t.step_func_done(function(e){ >+ assert_unreached("The load event should not be fired."); >+ }); >+ >+ obj.data = "http://test:test"; >+ document.body.appendChild(obj); >+}, "error event (using 'http:' protocol)"); >+ >+ >+async_test(function(t) { >+ var obj = document.createElement("object"); >+ obj.onload = t.step_func_done(function(e){ >+ assert_equals(Object.getPrototypeOf(e).constructor, Event, "The load event should use the Event interface."); >+ assert_true(e.isTrusted, "The load event should be a trusted event."); >+ assert_false(e.cancelable, "The load event should not be a cancelable event."); >+ assert_false(e.bubbles, "The load event should not be a bubble event."); >+ assert_equals(e.target, obj, "The load event target should be the corresponding object element."); >+ }); >+ >+ obj.onerror = t.step_func_done(function(e){ >+ assert_unreached("The error event should not be fired."); >+ }); >+ >+ obj.data = "/images/blue.png"; >+ document.body.appendChild(obj); >+}, "load event"); >+ >+async_test(function(t) { >+ var obj = document.createElement("object"); >+ obj.onload = t.step_func_done(function(e){ >+ assert_true(obj.contentWindow instanceof Window, "The object element should represent a nested browsing context.") >+ assert_equals(Object.getPrototypeOf(e).constructor, Event, "The load event should use the Event interface."); >+ assert_true(e.isTrusted, "The load event should be a trusted event."); >+ assert_false(e.cancelable, "The load event should not be a cancelable event."); >+ assert_false(e.bubbles, "The load event should not be a bubble event."); >+ assert_equals(e.target, obj, "The load event target should be the corresponding object element."); >+ }); >+ >+ obj.onerror = t.step_func_done(function(e){ >+ assert_unreached("The error event should not be fired."); >+ }); >+ >+ obj.data = "about:blank"; >+ document.body.appendChild(obj); >+}, "load event of about:blank"); >+ >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-fallback-failed-cross-origin-navigation.sub.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-fallback-failed-cross-origin-navigation.sub.html >new file mode 100644 >index 00000000000..d2190cc7af8 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-fallback-failed-cross-origin-navigation.sub.html >@@ -0,0 +1,52 @@ >+n<!DOCTYPE html> >+<meta charset=utf-8> >+<title>Test that <object> renders its own fallback.</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<body> >+<script> >+ // The host exists but the resource is unavailable. >+ const cross_origin_url_a = "http://{{hosts[alt][www]}}:{{ports[http][0]}}/foo.html"; >+ // The destination does not even exist and the navigation fails. >+ const cross_origin_url_b = "http://{{hosts[alt][nonexistent]}}:{{ports[http][0]}}/foo.html"; >+ >+ // Returns a promise which is resolved when |callback| returns true. The |callback| is invoked at >+ // every animation frame. >+ function for_each_animation_frame(callback) { >+ return new Promise((resolve) => { >+ function on_raf() { >+ if (!callback()) >+ resolve(); >+ window.requestAnimationFrame(on_raf); >+ } >+ window.requestAnimationFrame(on_raf); >+ }); >+ } >+ >+ // Create an <object> with some fallback content. >+ function create_object_with_fallback(url) { >+ var object = document.createElement("object"); >+ var fallback = document.createElement("button"); >+ fallback.textContent = "FALLBACK CONTENT"; >+ object.appendChild(fallback); >+ object.data = url; >+ object.type = "text/html"; >+ document.body.appendChild(object); >+ return object; >+ } >+ >+ function area(el) { >+ let bounds = el.getBoundingClientRect(); >+ return el.width * el.height; >+ } >+ >+ promise_test(async() => { >+ var object = create_object_with_fallback(cross_origin_url_a); >+ await for_each_animation_frame(() => area(object.firstChild) > 0); >+ object.parentElement.removeChild(object); >+ object = create_object_with_fallback(cross_origin_url_b); >+ await for_each_animation_frame(() => area(object.firstChild) > 0); >+ object.parentElement.removeChild(object); >+ }, "Verify fallback content for failed cross-origin navigations is shown correctly."); >+</script> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-setcustomvalidity.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-setcustomvalidity.html >new file mode 100644 >index 00000000000..44574ffd11f >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-setcustomvalidity.html >@@ -0,0 +1,17 @@ >+<!DOCTYPE HTML> >+<title>object setCustomValidity</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+ >+<object id='object_test'></object> >+ >+<script> >+ >+test(() => { >+ let elem = document.getElementById("object_test"); >+ assert_false(elem.validity.customError); >+ elem.setCustomValidity("custom error"); >+ assert_true(elem.validity.customError); >+}, "object setCustomValidity is correct") >+ >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/w3c-import.log >index 7060c83ec8d..ec07521bf0d 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >@@ -14,12 +14,16 @@ Property values requiring vendor prefixes: > None > ------------------------------------------------------------------------ > List of files: >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/document-getters-return-null-for-cross-origin.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/historical.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-attributes.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-events.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-fallback-failed-cross-origin-navigation.sub.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-fallback.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-handler.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-ignored-in-media-element.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-in-object-fallback-2.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-setcustomvalidity.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/test0.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/test1.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/test2.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsic_sizes.htm b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsic_sizes.htm >new file mode 100644 >index 00000000000..7819ee1c189 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsic_sizes.htm >@@ -0,0 +1,75 @@ >+<!doctype html> >+<html> >+<head> >+<title>video element - intrinsic sizes</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script src="/common/media.js"></script> >+</head> >+<body> >+<p><a href="https://html.spec.whatwg.org/multipage/#the-video-element">spec reference</a></p> >+<video id="v1"></video> >+<video id="v2" width="400"></video> >+<video id="v3" height="100"></video> >+<video id="v4"></video> >+<video id="v5" poster="/media/poster.png"></video> >+<div id="log"></div> >+<script> >+test(function() { >+ var s = getComputedStyle(document.getElementById("v1")); >+ assert_equals(s.width, "300px"); >+ assert_equals(s.height, "150px"); >+}, "default object size is 300x150"); >+ >+test(function() { >+ var s = getComputedStyle(document.getElementById("v2")); >+ assert_equals(s.width, "400px"); >+ assert_equals(s.height, "200px"); >+}, "default height is half the width"); >+ >+test(function() { >+ var s = getComputedStyle(document.getElementById("v3")); >+ assert_equals(s.width, "200px"); >+ assert_equals(s.height, "100px"); >+}, "default width is twice the height"); >+ >+async_test(function(t) { >+ var v = document.getElementById("v4"); >+ var s = getComputedStyle(v); >+ v.src = getVideoURI("/media/movie_5") + "?" + new Date() + Math.random(); >+ v.onerror = t.unreached_func(); >+ v.onloadedmetadata = t.step_func(function() { >+ assert_equals(s.width, '320px'); >+ assert_equals(s.height, '240px'); >+ v.removeAttribute("src"); >+ v.load(); >+ // Dimensions should be updated only on next layout. >+ assert_equals(s.width, '320px'); >+ assert_equals(s.height, '240px'); >+ requestAnimationFrame(t.step_func_done(function() { >+ assert_equals(s.width, "300px"); >+ assert_equals(s.height, "150px"); >+ })); >+ }); >+}, "default object size after src is removed"); >+ >+async_test(function(t) { >+ var v = document.getElementById("v5"); >+ var s = getComputedStyle(v); >+ v.onerror = t.unreached_func(); >+ onload = t.step_func(function() { >+ assert_equals(s.width, '102px'); >+ assert_equals(s.height, '77px'); >+ v.removeAttribute("poster"); >+ // Dimensions should be updated only on next layout. >+ assert_equals(s.width, '102px'); >+ assert_equals(s.height, '77px'); >+ requestAnimationFrame(t.step_func_done(function() { >+ assert_equals(s.width, "300px"); >+ assert_equals(s.height, "150px"); >+ })); >+ }); >+}, "default object size after poster is removed"); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html >new file mode 100644 >index 00000000000..d749d5576e6 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html >@@ -0,0 +1,39 @@ >+<!DOCTYPE html> >+<body> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+'use strict'; >+ >+promise_test(async() => { >+ var video = document.createElement('video'); >+ document.body.appendChild(video); >+ video.src = "/images/pattern.ogv"; >+ await new Promise(resolve => >+ video.addEventListener('canplaythrough', () => resolve(), {once: true})); >+ video.intrinsicSize = '400 x 500'; >+ assert_equals(video.getBoundingClientRect().width, 400, 'width'); >+ assert_equals(video.getBoundingClientRect().height, 500, 'height'); >+ assert_equals(video.videoWidth, 400, 'naturalWidth'); >+ assert_equals(video.videoHeight, 500, 'naturalHeight'); >+ >+ video.width = '800'; >+ assert_equals(video.getBoundingClientRect().width, 800, 'width'); >+ assert_equals(video.getBoundingClientRect().height, 1000, 'height'); >+ assert_equals(video.videoWidth, 400, 'naturalWidth'); >+ assert_equals(video.videoHeight, 500, 'naturalHeight'); >+ >+ video.style = 'height:800px;'; >+ assert_equals(video.getBoundingClientRect().width, 800, 'width'); >+ assert_equals(video.getBoundingClientRect().height, 800, 'height'); >+ assert_equals(video.videoWidth, 400, 'naturalWidth'); >+ assert_equals(video.videoHeight, 500, 'naturalHeight'); >+ >+ video.removeAttribute('width'); >+ assert_equals(video.getBoundingClientRect().width, 640, 'width'); >+ assert_equals(video.getBoundingClientRect().height, 800, 'height'); >+ assert_equals(video.videoWidth, 400, 'naturalWidth'); >+ assert_equals(video.videoHeight, 500, 'naturalHeight'); >+}, 'Test intrinsicsize for html video element'); >+</script> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html.headers b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html.headers >new file mode 100644 >index 00000000000..4fbf3f5addd >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html.headers >@@ -0,0 +1 @@ >+Feature-Policy: unsized-media * >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsicsize/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsicsize/w3c-import.log >new file mode 100644 >index 00000000000..4382b6966a1 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsicsize/w3c-import.log >@@ -0,0 +1,18 @@ >+The tests in this directory were imported from the W3C repository. >+Do NOT modify these tests directly in WebKit. >+Instead, create a pull request on the WPT github: >+ https://github.com/web-platform-tests/wpt >+ >+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport >+ >+Do NOT modify or remove this file. >+ >+------------------------------------------------------------------------ >+Properties requiring vendor prefixes: >+None >+Property values requiring vendor prefixes: >+None >+------------------------------------------------------------------------ >+List of files: >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsicsize/intrinsicsize-without-unsized-media.tentative.https.sub.html.headers >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/w3c-import.log >index 8acec4f935f..011a541220f 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/w3c-import.log >@@ -1,7 +1,7 @@ > The tests in this directory were imported from the W3C repository. > Do NOT modify these tests directly in WebKit. > Instead, create a pull request on the WPT github: >- https://github.com/w3c/web-platform-tests >+ https://github.com/web-platform-tests/wpt > > Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport > >@@ -14,6 +14,7 @@ Property values requiring vendor prefixes: > None > ------------------------------------------------------------------------ > List of files: >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/intrinsic_sizes.htm > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video-tabindex.html > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video_content_image-expected.htm > /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video_content_image.htm >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/w3c-import.log >new file mode 100644 >index 00000000000..25f98a029d6 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/w3c-import.log >@@ -0,0 +1,17 @@ >+The tests in this directory were imported from the W3C repository. >+Do NOT modify these tests directly in WebKit. >+Instead, create a pull request on the WPT github: >+ https://github.com/web-platform-tests/wpt >+ >+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport >+ >+Do NOT modify or remove this file. >+ >+------------------------------------------------------------------------ >+Properties requiring vendor prefixes: >+None >+Property values requiring vendor prefixes: >+None >+------------------------------------------------------------------------ >+List of files: >+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/META.yml >diff --git a/LayoutTests/platform/mac-wk1/TestExpectations b/LayoutTests/platform/mac-wk1/TestExpectations >index 4b593ddf512..fce9a1f5457 100644 >--- a/LayoutTests/platform/mac-wk1/TestExpectations >+++ b/LayoutTests/platform/mac-wk1/TestExpectations >@@ -349,8 +349,6 @@ fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html [ Skip ] > fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate.html [ Skip ] > http/tests/download/convert-cached-load-to-download.html [ Skip ] > >-webkit.org/b/156629 imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html [ Pass Failure ] >- > webkit.org/b/157007 fast/layers/no-clipping-overflow-hidden-added-after-transform.html [ Pass ImageOnlyFailure ] > webkit.org/b/157007 legacy-animation-engine/fast/layers/no-clipping-overflow-hidden-added-after-transform.html [ Pass ImageOnlyFailure ] > >diff --git a/LayoutTests/tests-options.json b/LayoutTests/tests-options.json >index 42bfbae47a9..a3cde880037 100644 >--- a/LayoutTests/tests-options.json >+++ b/LayoutTests/tests-options.json >@@ -1274,9 +1274,24 @@ > "imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-iframe.html": [ > "slow" > ], >+ "imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes-svg.tentative.html": [ >+ "slow" >+ ], > "imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes.html": [ > "slow" > ], >+ "imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-picture.html": [ >+ "slow" >+ ], >+ "imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-svg.tentative.html": [ >+ "slow" >+ ], >+ "imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach-svg.tentative.html": [ >+ "slow" >+ ], >+ "imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html": [ >+ "slow" >+ ], > "imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/decode/image-decode.html": [ > "slow" > ], >-- >2.20.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194770
:
362269
|
362272
|
362274
|
362280
|
362284
|
362285
|
362286
|
362292
|
363091
|
363742
|
363749
|
363754
|
363774