WebKit Bugzilla
Attachment 360148 Details for
Bug 167341
: [iOS] Add support for the download attribute
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP Patch
167341_ios_downloadAttribute_real_wip.patch (text/plain), 26.31 KB, created by
Chris Dumez
on 2019-01-25 12:58:43 PST
(
hide
)
Description:
WIP Patch
Filename:
MIME Type:
Creator:
Chris Dumez
Created:
2019-01-25 12:58:43 PST
Size:
26.31 KB
patch
obsolete
>diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-download-unset.html b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-download-unset.html >index 94c36ec3bd0..5b9fcf07b00 100644 >--- a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-download-unset.html >+++ b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-download-unset.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="../../../resources/ui-helper.js"></script> > <script type='text/javascript'> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -17,9 +18,7 @@ function click(elmt) > alert('Click the link to run the test.'); > return; > } >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html >index 67c7ce9c26f..82dedd8b4b1 100644 >--- a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html >+++ b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="../../../resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -21,9 +22,7 @@ function userClick(element) > alert('Click the button to run the test.'); > return; > } >- eventSender.mouseMoveTo(element.offsetLeft + 5, element.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(element.offsetLeft + 5, element.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate.html b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate.html >index a2fb5562be2..217495694fa 100644 >--- a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate.html >+++ b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="../../../resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -22,9 +23,7 @@ function click(elmt) > alert('Click the link to run the test.'); > return; > } >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html >index ad0030dceab..07e8c969a4c 100644 >--- a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html >+++ b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="../../../resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -20,9 +21,7 @@ function click(elmt) > alert('Click the link to run the test.'); > return; > } >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-base-target-popup-not-allowed.html b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-base-target-popup-not-allowed.html >index 98c0248081b..0d76479f050 100644 >--- a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-base-target-popup-not-allowed.html >+++ b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-base-target-popup-not-allowed.html >@@ -2,6 +2,7 @@ > <html> > <head> > <base target="_blank"> >+<script src="../../../resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -20,9 +21,7 @@ function click(elmt) > alert('Click the link to run the test.'); > return; > } >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target-popup-not-allowed.html b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target-popup-not-allowed.html >index 0aebd0fa0e3..9507fdcb360 100644 >--- a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target-popup-not-allowed.html >+++ b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target-popup-not-allowed.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="../../../resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -19,9 +20,7 @@ function click(elmt) > alert('Click the link to run the test.'); > return; > } >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target.html b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target.html >index 6d17de6faac..c96dd324e6f 100644 >--- a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target.html >+++ b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="../../../resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -20,9 +21,7 @@ function click(elmt) > alert('Click the link to run the test.'); > return; > } >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html >index 34df83545f6..18e568e96a9 100644 >--- a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html >+++ b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="../../../resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -19,9 +20,7 @@ function click(elmt) > alert('Click the link to run the test.'); > return; > } >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-doublequote.html b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-doublequote.html >index 9a148b6e202..cc1144314e4 100644 >--- a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-doublequote.html >+++ b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-doublequote.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="../../../resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -19,9 +20,7 @@ function click(elmt) > alert('Click the link to run the test.'); > return; > } >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-slashes.html b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-slashes.html >index bdbbb79daad..e1be95bee81 100644 >--- a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-slashes.html >+++ b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-slashes.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="../../../resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -19,9 +20,7 @@ function click(elmt) > alert('Click the link to run the test.'); > return; > } >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-unicode.html b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-unicode.html >index f1d34289e2b..5dad4cebf09 100644 >--- a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-unicode.html >+++ b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-unicode.html >@@ -2,6 +2,7 @@ > <html> > <head> > <meta charset="utf-8"> >+<script src="../../../resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -20,9 +21,7 @@ function click(elmt) > alert('Click the link to run the test.'); > return; > } >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html >index fe43d4509bc..ca517564ff8 100644 >--- a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html >+++ b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="../../../resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -19,9 +20,7 @@ function click(elmt) > alert('Click the link to run the test.'); > return; > } >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-nodownload-set.html b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-nodownload-set.html >index d9a377ff853..da5b6cdd9b5 100644 >--- a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-nodownload-set.html >+++ b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-nodownload-set.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="../../../resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -18,9 +19,7 @@ function click(elmt) > alert('Click the link to run the test.'); > return; > } >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-nodownload.html b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-nodownload.html >index de2e98d2f40..557c1efb559 100644 >--- a/LayoutTests/fast/dom/HTMLAnchorElement/anchor-nodownload.html >+++ b/LayoutTests/fast/dom/HTMLAnchorElement/anchor-nodownload.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="../../../resources/ui-helper.js"></script> > <script type='text/javascript'> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -17,9 +18,7 @@ function click(elmt) > alert('Click the link to run the test.'); > return; > } >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/http/tests/download/anchor-download-attribute-content-disposition.html b/LayoutTests/http/tests/download/anchor-download-attribute-content-disposition.html >index 40c722f31f8..c3338d77c68 100644 >--- a/LayoutTests/http/tests/download/anchor-download-attribute-content-disposition.html >+++ b/LayoutTests/http/tests/download/anchor-download-attribute-content-disposition.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="/js-test-resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -20,9 +21,7 @@ function click(elmt) > alert('Click the link to run the test.'); > return; > } >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/http/tests/download/anchor-download-no-extension.html b/LayoutTests/http/tests/download/anchor-download-no-extension.html >index 8ec78049048..7bb6b8308f8 100644 >--- a/LayoutTests/http/tests/download/anchor-download-no-extension.html >+++ b/LayoutTests/http/tests/download/anchor-download-no-extension.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="/js-test-resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -19,9 +20,7 @@ function click(elmt) > alert('Click the link to run the test.'); > return; > } >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/http/tests/download/anchor-download-no-value.html b/LayoutTests/http/tests/download/anchor-download-no-value.html >index 67c02045a77..b25253b885b 100644 >--- a/LayoutTests/http/tests/download/anchor-download-no-value.html >+++ b/LayoutTests/http/tests/download/anchor-download-no-value.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="/js-test-resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -19,9 +20,7 @@ function click(elmt) > alert('Click the link to run the test.'); > return; > } >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/http/tests/download/anchor-download-redirect.html b/LayoutTests/http/tests/download/anchor-download-redirect.html >index 32d3d21ac8a..6c863a9683a 100644 >--- a/LayoutTests/http/tests/download/anchor-download-redirect.html >+++ b/LayoutTests/http/tests/download/anchor-download-redirect.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="/js-test-resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -21,9 +22,7 @@ The suggested filename at the top should be foo.pdf and you should see a redirec > if (!window.eventSender) > return; > >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/http/tests/download/area-download.html b/LayoutTests/http/tests/download/area-download.html >index 558820426f1..5ca2aceba7f 100644 >--- a/LayoutTests/http/tests/download/area-download.html >+++ b/LayoutTests/http/tests/download/area-download.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="/js-test-resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -22,9 +23,7 @@ > if (!window.eventSender) > return; > >- eventSender.mouseMoveTo(elmt.offsetLeft + 10, elmt.offsetTop + 10); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 10, elmt.offsetTop + 10); > } > > function runTest() >diff --git a/LayoutTests/http/tests/download/convert-cached-load-to-download.html b/LayoutTests/http/tests/download/convert-cached-load-to-download.html >index bf9deaceb98..0a41714643c 100644 >--- a/LayoutTests/http/tests/download/convert-cached-load-to-download.html >+++ b/LayoutTests/http/tests/download/convert-cached-load-to-download.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="/js-test-resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -22,9 +23,7 @@ function click(elmt) > alert('Click the link to run the test.'); > return; > } >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function cacheTestResource(then) >diff --git a/LayoutTests/http/tests/security/anchor-download-allow-blob.html b/LayoutTests/http/tests/security/anchor-download-allow-blob.html >index ee42aa90bdd..78335687979 100644 >--- a/LayoutTests/http/tests/security/anchor-download-allow-blob.html >+++ b/LayoutTests/http/tests/security/anchor-download-allow-blob.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="/js-test-resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -20,9 +21,7 @@ Tests that a suggested filename on a download attribute is allowed if > if (!window.eventSender) > return; > >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/http/tests/security/anchor-download-allow-data.html b/LayoutTests/http/tests/security/anchor-download-allow-data.html >index cacfcef0614..551e893c5e4 100644 >--- a/LayoutTests/http/tests/security/anchor-download-allow-data.html >+++ b/LayoutTests/http/tests/security/anchor-download-allow-data.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="/js-test-resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -20,9 +21,7 @@ Tests that a suggested filename on a download attribute is allowed if > if (!window.eventSender) > return; > >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/http/tests/security/anchor-download-allow-sameorigin.html b/LayoutTests/http/tests/security/anchor-download-allow-sameorigin.html >index 5310879d1a3..d00562af952 100644 >--- a/LayoutTests/http/tests/security/anchor-download-allow-sameorigin.html >+++ b/LayoutTests/http/tests/security/anchor-download-allow-sameorigin.html >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >+<script src="/js-test-resources/ui-helper.js"></script> > <script> > if (window.testRunner) { > testRunner.dumpAsText(); >@@ -21,9 +22,7 @@ The suggested filename at the top should be foo.pdf. > if (!window.eventSender) > return; > >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/http/tests/security/anchor-download-block-crossorigin-expected.txt b/LayoutTests/http/tests/security/anchor-download-block-crossorigin-expected.txt >index f03a4bc3b25..06d6cf57962 100644 >--- a/LayoutTests/http/tests/security/anchor-download-block-crossorigin-expected.txt >+++ b/LayoutTests/http/tests/security/anchor-download-block-crossorigin-expected.txt >@@ -1,4 +1,4 @@ >-CONSOLE MESSAGE: line 25: The download attribute on anchor was ignored because its href URL has a different security origin. >+CONSOLE MESSAGE: line 88: The download attribute on anchor was ignored because its href URL has a different security origin. > Tests that the download attribute is ignored if the link is cross origin. > > It should navigate the subframe instead of downloading the file. >diff --git a/LayoutTests/http/tests/security/anchor-download-block-crossorigin.html b/LayoutTests/http/tests/security/anchor-download-block-crossorigin.html >index ed416ddbb84..97a7962ad26 100644 >--- a/LayoutTests/http/tests/security/anchor-download-block-crossorigin.html >+++ b/LayoutTests/http/tests/security/anchor-download-block-crossorigin.html >@@ -2,6 +2,7 @@ > <html> > <head> > <script src="../../../resources/js-test-pre.js"></script> >+<script src="/js-test-resources/ui-helper.js"></script> > <script> > if (window.testRunner) > testRunner.waitUntilDone(); >@@ -20,9 +21,7 @@ Tests that the download attribute is ignored if > if (!window.eventSender) > return; > >- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); >- eventSender.mouseDown(); >- eventSender.mouseUp(); >+ UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5); > } > > function runTest() >diff --git a/LayoutTests/platform/ios-wk2/TestExpectations b/LayoutTests/platform/ios-wk2/TestExpectations >index d51e525cdfb..2750d51d373 100644 >--- a/LayoutTests/platform/ios-wk2/TestExpectations >+++ b/LayoutTests/platform/ios-wk2/TestExpectations >@@ -1067,38 +1067,6 @@ webkit.org/b/155948 legacy-animation-engine/transitions/cancel-transition.html [ > webkit.org/b/189686 webgl/2.0.0/conformance2/textures/misc/copy-texture-image-luma-format.html [ Skip ] > webkit.org/b/189686 webgl/2.0.0/conformance/textures/misc/tex-image-and-sub-image-2d-with-array-buffer-view.html [ Skip ] > >- >-# <a download> does not work on iOS. >-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-download-unset.html [ Skip ] >-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-download.html [ Skip ] >-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html [ Skip ] >-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate.html [ Skip ] >-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download.html [ Skip ] >-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-base-target-popup-not-allowed.html [ Skip ] >-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target.html [ Skip ] >-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target-popup-not-allowed.html [ Skip ] >-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html [ Skip ] >-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-doublequote.html [ Skip ] >-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-slashes.html [ Skip ] >-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-unicode.html [ Skip ] >-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html [ Skip ] >-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download-then-revoke.html [ Skip ] >-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-nodownload-set.html [ Skip ] >-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-nodownload.html [ Skip ] >-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-download-synthetic-click.html [ Skip ] >-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html [ Skip ] >-webkit.org/b/156067 http/tests/download/anchor-download-attribute-content-disposition.html [ Skip ] >-webkit.org/b/156067 http/tests/download/anchor-download-no-extension.html [ Skip ] >-webkit.org/b/156067 http/tests/download/anchor-download-redirect.html [ Skip ] >-webkit.org/b/156067 http/tests/download/anchor-load-after-download.html [ Skip ] >-webkit.org/b/156067 http/tests/download/area-download.html [ Skip ] >-webkit.org/b/156067 http/tests/security/anchor-download-allow-blob.html [ Skip ] >-webkit.org/b/156067 http/tests/security/anchor-download-allow-data.html [ Skip ] >-webkit.org/b/156067 http/tests/security/anchor-download-allow-sameorigin.html [ Skip ] >-webkit.org/b/156067 http/tests/security/anchor-download-block-crossorigin.html [ Skip ] >-webkit.org/b/156067 http/tests/download/anchor-download-no-value.html [ Skip ] >-webkit.org/b/156067 http/tests/download/convert-cached-load-to-download.html [ Skip ] >- > webkit.org/b/149087 http/tests/cache/disk-cache/disk-cache-vary.html [ Pass Timeout ] > webkit.org/b/149087 http/tests/cache/disk-cache/disk-cache-vary-no-body.html [ Pass Timeout ] > >diff --git a/LayoutTests/platform/ios-wk2/http/tests/security/anchor-download-block-crossorigin-expected.txt b/LayoutTests/platform/ios-wk2/http/tests/security/anchor-download-block-crossorigin-expected.txt >new file mode 100644 >index 00000000000..142cd1f04f7 >--- /dev/null >+++ b/LayoutTests/platform/ios-wk2/http/tests/security/anchor-download-block-crossorigin-expected.txt >@@ -0,0 +1,6 @@ >+CONSOLE MESSAGE: The download attribute on anchor was ignored because its href URL has a different security origin. >+Tests that the download attribute is ignored if the link is cross origin. >+ >+It should navigate the subframe instead of downloading the file. >+ >+ >diff --git a/Source/WTF/wtf/FeatureDefines.h b/Source/WTF/wtf/FeatureDefines.h >index 52721af76a2..7f177559519 100644 >--- a/Source/WTF/wtf/FeatureDefines.h >+++ b/Source/WTF/wtf/FeatureDefines.h >@@ -162,7 +162,7 @@ the public iOS SDK. See <https://webkit.org/b/179167>. */ > #endif > > #if !defined(ENABLE_DOWNLOAD_ATTRIBUTE) >-#define ENABLE_DOWNLOAD_ATTRIBUTE 0 >+#define ENABLE_DOWNLOAD_ATTRIBUTE 1 > #endif > > #if !defined(ENABLE_WKLEGACYPDFVIEW)
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 167341
:
343024
|
360148
|
360153
|
360154
|
360170
|
376769