REGRESSION (r237699): Layout Test http/tests/security/anchor-download-block-crossorig...
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Nov 2018 00:06:09 +0000 (00:06 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Nov 2018 00:06:09 +0000 (00:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=191199

Reviewed by Dewei Zhu.

Navigate the subframe instead of the main frame, to make sure that the console message is consistently logged.

* http/tests/security/anchor-download-block-crossorigin-expected.txt:
* http/tests/security/anchor-download-block-crossorigin.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237760 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/http/tests/security/anchor-download-block-crossorigin-expected.txt
LayoutTests/http/tests/security/anchor-download-block-crossorigin.html

index 444815f..945ca96 100644 (file)
@@ -1,3 +1,15 @@
+2018-11-02  Chris Dumez  <cdumez@apple.com>
+
+        REGRESSION (r237699): Layout Test http/tests/security/anchor-download-block-crossorigin.html is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=191199
+
+        Reviewed by Dewei Zhu.
+
+        Navigate the subframe instead of the main frame, to make sure that the console message is consistently logged.
+
+        * http/tests/security/anchor-download-block-crossorigin-expected.txt:
+        * http/tests/security/anchor-download-block-crossorigin.html:
+
 2018-11-02  Per Arne Vollan  <pvollan@apple.com>
 
         [Win] Layout Test fast/block/basic/inline-content-with-floating-image.html is failing
index f4077b8..f03a4bc 100644 (file)
@@ -1,2 +1,6 @@
-CONSOLE MESSAGE: line 24: The download attribute on anchor was ignored because its href URL has a different security origin.
-PASS
+CONSOLE MESSAGE: line 25: 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.
+
+
index c00a086..ed416dd 100644 (file)
 <body>
 <p>
 Tests that the download attribute is ignored if 
-<a id="dl" href="http://localhost:8080/resources/pass-notify-done.html" download="FAIL.pdf">the link</a> is cross origin.
+<a id="dl" href="http://localhost:8080/resources/pass-notify-done.html" download="FAIL.pdf" target="targetFrame">the link</a> is cross origin.
 <p>
-It should navigate instead of downloading the file.
+<p>It should navigate the subframe instead of downloading the file.</p>
+<iframe name="targetFrame"></iframe>
 <script>
     function click(elmt)
     {
@@ -29,7 +30,7 @@ It should navigate instead of downloading the file.
         var link = document.getElementById("dl");
         click(link);
     }
-    runTest();
+    onload = runTest;
 </script>
 </body>
 </html>