WebKit Bugzilla
Attachment 368556 Details for
Bug 197371
: Store prefetch redirects in the prefetch cache
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197371-20190430153516.patch (text/plain), 2.79 KB, created by
Rob Buis
on 2019-04-30 06:35:17 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Rob Buis
Created:
2019-04-30 06:35:17 PDT
Size:
2.79 KB
patch
obsolete
>Subversion Revision: 244764 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 87c1bd7fe0c99d8f3fb1538ca81b6d9d35be00e5..c546473421a016c38a23be240021768974fb1220 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2019-04-30 Rob Buis <rbuis@igalia.com> >+ >+ Add tests for prefetch redirects >+ https://bugs.webkit.org/show_bug.cgi?id=197371 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * http/tests/cache/link-prefetch-main-resource-redirect-expected.txt: Added. >+ * http/tests/cache/link-prefetch-main-resource-redirect.html: Added. >+ * http/tests/cache/resources/prefetched-main-resource-redirect.php: Added. >+ > 2019-04-29 Truitt Savell <tsavell@apple.com> > > Unreviewed, rolling out r244755. >diff --git a/LayoutTests/http/tests/cache/link-prefetch-main-resource-redirect-expected.txt b/LayoutTests/http/tests/cache/link-prefetch-main-resource-redirect-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..7ef22e9a431ad0272713b71fdc8794016c8ef12f >--- /dev/null >+++ b/LayoutTests/http/tests/cache/link-prefetch-main-resource-redirect-expected.txt >@@ -0,0 +1 @@ >+PASS >diff --git a/LayoutTests/http/tests/cache/link-prefetch-main-resource-redirect.html b/LayoutTests/http/tests/cache/link-prefetch-main-resource-redirect.html >new file mode 100644 >index 0000000000000000000000000000000000000000..6182a728f2d80daa1a949e6f002e0c3b97582743 >--- /dev/null >+++ b/LayoutTests/http/tests/cache/link-prefetch-main-resource-redirect.html >@@ -0,0 +1,16 @@ >+<html> >+<script> >+if (window.testRunner) { >+ testRunner.waitUntilDone(); >+ testRunner.dumpAsText(); >+} >+ >+function loadAfterPrefetch() >+{ >+ window.location.assign('http://localhost:8000/cache/resources/prefetched-main-resource-redirect.php'); >+} >+</script> >+<body> >+<link rel="prefetch" href="http://localhost:8000/cache/resources/prefetched-main-resource-redirect.php" onload="loadAfterPrefetch()"> >+</body> >+</html> >diff --git a/LayoutTests/http/tests/cache/resources/prefetched-main-resource-redirect.php b/LayoutTests/http/tests/cache/resources/prefetched-main-resource-redirect.php >new file mode 100644 >index 0000000000000000000000000000000000000000..873ac8f1a3f39544cfdd4772627e1137a5168708 >--- /dev/null >+++ b/LayoutTests/http/tests/cache/resources/prefetched-main-resource-redirect.php >@@ -0,0 +1,27 @@ >+<?php >+if ($_SERVER["HTTP_PURPOSE"] == "prefetch") { >+ header('HTTP/1.1 ' . 200); >+} else { >+ header('HTTP/1.1 ' . 302); >+ header('Location: ' . 'prefetched-main-resource.php'); >+} >+header('Cache-Control: max-age=3600'); >+?> >+<!DOCTYPE html> >+<html> >+<body> >+<script> >+ >+if (window.testRunner) >+ testRunner.notifyDone(); >+ >+</script> >+<?php >+if ($_SERVER["HTTP_PURPOSE"] == "prefetch") { >+ print('PASS'); >+} else { >+ print('FAIL'); >+} >+?> >+</body> >+</html>
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 197371
:
368556
|
368559
|
368560
|
368565
|
368566
|
368568
|
369382
|
369384
|
369386
|
369387
|
369388
|
369418
|
369504
|
369733
|
371728
|
371854
|
372194