WebKit Bugzilla
Attachment 373710 Details for
Bug 199616
: Remove rel=subresource tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199616-20190709150643.patch (text/plain), 11.46 KB, created by
Rob Buis
on 2019-07-09 06:06:44 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Rob Buis
Created:
2019-07-09 06:06:44 PDT
Size:
11.46 KB
patch
obsolete
>Subversion Revision: 247254 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 6c19b7259cfd62954d4c21519ad6296c0302292a..9081dbb644ad4cf26e39c840f2c97557075a3881 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,20 @@ >+2019-07-09 Rob Buis <rbuis@igalia.com> >+ >+ Remove rel=subresource >+ https://bugs.webkit.org/show_bug.cgi?id=199616 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Remove rel=subresource references by deleting or using rel=prefetch >+ instead. >+ >+ * TestExpectations: >+ * fast/dom/HTMLLinkElement/cachedresource-types.html: >+ * http/tests/misc/link-rel-prefetch-and-subresource.html: Removed. >+ * webarchive/test-link-rel-prefetch-beforeload-expected.webarchive: Added. >+ * webarchive/test-link-rel-prefetch-beforeload.html: Copied from LayoutTests/webarchive/test-link-rel-subresource-beforeload.html. >+ * webarchive/test-link-rel-subresource-beforeload.html: >+ > 2019-07-08 Saam Barati <sbarati@apple.com> > > [WHLSL Import 23 new JS reference spec tests >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index 7b4fbd60cf80c1effd8224f692ef7b7503e8092d..aeb9ac2ecb3c48c9bc1182dd3f4cbb2700eb675d 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -2339,7 +2339,6 @@ webkit.org/b/3652 fast/dom/HTMLLinkElement/prefetch-onerror.html [ Skip ] > webkit.org/b/3652 fast/dom/HTMLLinkElement/prefetch-onload.html [ Skip ] > webkit.org/b/3652 fast/dom/HTMLLinkElement/prefetch-too-many-clients.html [ Skip ] > webkit.org/b/3652 fast/dom/HTMLLinkElement/subresource.html [ Skip ] >-webkit.org/b/3652 http/tests/misc/link-rel-prefetch-and-subresource.html [ Skip ] > webkit.org/b/3652 http/tests/misc/prefetch-purpose.html [ Skip ] > > # First-party-only cookie policy only supported on Cocoa platforms. >diff --git a/LayoutTests/fast/dom/HTMLLinkElement/cachedresource-types.html b/LayoutTests/fast/dom/HTMLLinkElement/cachedresource-types.html >index 9cbb57501647e81d6f665ed3f9e49e8d33ed4b3b..545b1adc133926b13aa8d89d52e7d2c7df4acb16 100644 >--- a/LayoutTests/fast/dom/HTMLLinkElement/cachedresource-types.html >+++ b/LayoutTests/fast/dom/HTMLLinkElement/cachedresource-types.html >@@ -3,7 +3,7 @@ if (window.testRunner) > testRunner.dumpAsText(); > > </script> >-<link rel="subresource" href="resources/does-not-exist.jpg"/> >+<link rel="prefetch" href="resources/does-not-exist.jpg"/> > <img src="resources/does-not-exist.jpg"> > > This test passes if it does not crash. >diff --git a/LayoutTests/http/tests/misc/link-rel-prefetch-and-subresource.html b/LayoutTests/http/tests/misc/link-rel-prefetch-and-subresource.html >deleted file mode 100644 >index b724bbe5bc208967634b50a6a69f84ef08448ed1..0000000000000000000000000000000000000000 >--- a/LayoutTests/http/tests/misc/link-rel-prefetch-and-subresource.html >+++ /dev/null >@@ -1,73 +0,0 @@ >-<html> >-<head> >- <script> >-function CallCommand(cmd) >-{ >- try { >- var req = new XMLHttpRequest; >- req.open("GET", "/resources/network-simulator.php?test=misc-link-rel-prefetch-and-subresource&command=" + cmd, false); >- req.send(null); >- return req.responseText; >- } catch (ex) { >- return ""; >- } >-} >- >-function startTest() >-{ >- if (window.testRunner) { >- testRunner.dumpAsText(); >- testRunner.waitUntilDone(); >- } >-} >- >-function endTest() >-{ >- getResourceLog(); >- CallCommand("clear-resource-request-log"); >- >- if (window.testRunner) >- testRunner.notifyDone(); >-} >- >-function getResourceLog() >-{ >- var log = CallCommand("get-resource-request-log"); >- var logLines = log.split('\n'); >- logLines.sort(); >- document.getElementById('result').innerText = logLines.join('\n'); >-} >- >-CallCommand("start-resource-request-log"); >-window.addEventListener('load', startTest, false); >- </script> >- >- <!-- link rel=subresource is very similar to link rel=prefetch, however it is >- expected to have a higher network priority. This test should confirm that the >- priorities of the two types of prefetch are being observed --> >- >- <script> >- var linkLoadCount = 5; >- >- function decrementLinkLoadCount() >- { >- linkLoadCount--; >- if (linkLoadCount == 0) { >- endTest(); >- } >- } >- </script> >- <link rel=prefetch onload="decrementLinkLoadCount()" href="/resources/network-simulator.php?test=misc-link-rel-prefetch-and-subresource&command=log-resource-request&path=1st.jpg"> >- <link rel=subresource onload="decrementLinkLoadCount()" href="/resources/network-simulator.php?test=misc-link-rel-prefetch-and-subresource&command=log-resource-request&path=2nd.jpg"> >- <link rel=prefetch onload="decrementLinkLoadCount()" href="/resources/network-simulator.php?test=misc-link-rel-prefetch-and-subresource&command=log-resource-request&path=3rd.jpg"> >- <link rel=prefetch onload="decrementLinkLoadCount()" href="/resources/network-simulator.php?test=misc-link-rel-prefetch-and-subresource&command=log-resource-request&path=4th.jpg"> >- <link rel=subresource onload="decrementLinkLoadCount()" href="/resources/network-simulator.php?test=misc-link-rel-prefetch-and-subresource&command=log-resource-request&path=5th.jpg"> >-</head> >-<body> >- >- <div class="box bordered"></div> >- >- <h2>Resource requests:</h2> >- <pre id="result">Request log goes here in DRT</pre> >-</body> >-</html> >diff --git a/LayoutTests/webarchive/test-link-rel-prefetch-beforeload-expected.webarchive b/LayoutTests/webarchive/test-link-rel-prefetch-beforeload-expected.webarchive >new file mode 100644 >index 0000000000000000000000000000000000000000..abe523aec9fc891aed9dffcf3484915e3c0eea70 >--- /dev/null >+++ b/LayoutTests/webarchive/test-link-rel-prefetch-beforeload-expected.webarchive >@@ -0,0 +1,47 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> >+<plist version="1.0"> >+<dict> >+ <key>WebMainResource</key> >+ <dict> >+ <key>WebResourceData</key> >+ <string><html><head> >+<script> >+function runTest() >+{ >+ if (window.testRunner) { >+ testRunner.dumpDOMAsWebArchive(); >+ testRunner.queueReload(); >+ } >+} >+</script> >+</head> >+<body onload="runTest()"> >+<div id="console"><div style="font-family: monospace; color: green;">PASS</div><div style="font-family: monospace; color: green;">PASS</div></div> >+<script> >+function print(message, color) >+{ >+ var paragraph = document.createElement("div"); >+ paragraph.appendChild(document.createTextNode(message)); >+ paragraph.style.fontFamily = "monospace"; >+ if (color) >+ paragraph.style.color = color; >+ document.getElementById("console").appendChild(paragraph); >+} >+</script> >+<p>This test should have a green 'PASS' just above this line. If it doesn't, you failed. >+<link rel="prefetch" onbeforeload="print('PASS','green');return false" href="resources/favicon.ico" type="image/x-icon"> >+ >+ >+</p></body></html></string> >+ <key>WebResourceFrameName</key> >+ <string></string> >+ <key>WebResourceMIMEType</key> >+ <string>text/html</string> >+ <key>WebResourceTextEncodingName</key> >+ <string>UTF-8</string> >+ <key>WebResourceURL</key> >+ <string>file:///LayoutTests/webarchive/test-link-rel-prefetch-beforeload.html</string> >+ </dict> >+</dict> >+</plist> >diff --git a/LayoutTests/webarchive/test-link-rel-prefetch-beforeload.html b/LayoutTests/webarchive/test-link-rel-prefetch-beforeload.html >new file mode 100644 >index 0000000000000000000000000000000000000000..f55a203386a25d494341a98e280c8c64e33ebdcb >--- /dev/null >+++ b/LayoutTests/webarchive/test-link-rel-prefetch-beforeload.html >@@ -0,0 +1,29 @@ >+<html> >+<head> >+<script> >+function runTest() >+{ >+ if (window.testRunner) { >+ testRunner.dumpDOMAsWebArchive(); >+ testRunner.queueReload(); >+ } >+} >+</script> >+</head> >+<body onload="runTest()"> >+<div id="console"></div> >+<script> >+function print(message, color) >+{ >+ var paragraph = document.createElement("div"); >+ paragraph.appendChild(document.createTextNode(message)); >+ paragraph.style.fontFamily = "monospace"; >+ if (color) >+ paragraph.style.color = color; >+ document.getElementById("console").appendChild(paragraph); >+} >+</script> >+<p>This test should have a green 'PASS' just above this line. If it doesn't, you failed. >+<link rel="prefetch" onbeforeload="print('PASS','green');return false" href="resources/favicon.ico" type="image/x-icon"> >+</body> >+</html> >diff --git a/LayoutTests/webarchive/test-link-rel-subresource-beforeload-expected.webarchive b/LayoutTests/webarchive/test-link-rel-subresource-beforeload-expected.webarchive >deleted file mode 100644 >index 6b256b03fa49f07da20023505829bc4f375ef5f3..0000000000000000000000000000000000000000 >--- a/LayoutTests/webarchive/test-link-rel-subresource-beforeload-expected.webarchive >+++ /dev/null >@@ -1,47 +0,0 @@ >-<?xml version="1.0" encoding="UTF-8"?> >-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> >-<plist version="1.0"> >-<dict> >- <key>WebMainResource</key> >- <dict> >- <key>WebResourceData</key> >- <string><html><head> >-<script> >-function runTest() >-{ >- if (window.testRunner) { >- testRunner.dumpDOMAsWebArchive(); >- testRunner.queueReload(); >- } >-} >-</script> >-</head> >-<body onload="runTest()"> >-<div id="console"><div style="font-family: monospace; color: green;">PASS</div></div> >-<script> >-function print(message, color) >-{ >- var paragraph = document.createElement("div"); >- paragraph.appendChild(document.createTextNode(message)); >- paragraph.style.fontFamily = "monospace"; >- if (color) >- paragraph.style.color = color; >- document.getElementById("console").appendChild(paragraph); >-} >-</script> >-<p>This test should have a green 'PASS' just above this line. If it doesn't, you failed. >-<link rel="subresource" onbeforeload="print('PASS','green');return false" href="resources/favicon.ico" type="image/x-icon"> >- >- >-</p></body></html></string> >- <key>WebResourceFrameName</key> >- <string></string> >- <key>WebResourceMIMEType</key> >- <string>text/html</string> >- <key>WebResourceTextEncodingName</key> >- <string>UTF-8</string> >- <key>WebResourceURL</key> >- <string>file:///LayoutTests/webarchive/test-link-rel-subresource-beforeload.html</string> >- </dict> >-</dict> >-</plist> >diff --git a/LayoutTests/webarchive/test-link-rel-subresource-beforeload.html b/LayoutTests/webarchive/test-link-rel-subresource-beforeload.html >deleted file mode 100644 >index 1898a7a452a89253cce6caa0478adb91a9c3ff0c..0000000000000000000000000000000000000000 >--- a/LayoutTests/webarchive/test-link-rel-subresource-beforeload.html >+++ /dev/null >@@ -1,29 +0,0 @@ >-<html> >-<head> >-<script> >-function runTest() >-{ >- if (window.testRunner) { >- testRunner.dumpDOMAsWebArchive(); >- testRunner.queueReload(); >- } >-} >-</script> >-</head> >-<body onload="runTest()"> >-<div id="console"></div> >-<script> >-function print(message, color) >-{ >- var paragraph = document.createElement("div"); >- paragraph.appendChild(document.createTextNode(message)); >- paragraph.style.fontFamily = "monospace"; >- if (color) >- paragraph.style.color = color; >- document.getElementById("console").appendChild(paragraph); >-} >-</script> >-<p>This test should have a green 'PASS' just above this line. If it doesn't, you failed. >-<link rel="subresource" onbeforeload="print('PASS','green');return false" href="resources/favicon.ico" type="image/x-icon"> >-</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 199616
:
373706
|
373707
|
373709
|
373710
|
373713
|
373719
|
373734