Remove rel=subresource tests
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jul 2019 19:38:54 +0000 (19:38 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jul 2019 19:38:54 +0000 (19:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=199616

Patch by Rob Buis <rbuis@igalia.com> on 2019-07-09
Reviewed by Ryosuke Niwa.

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-subresource-beforeload-expected.webarchive: Removed.
* webarchive/test-link-rel-subresource-beforeload.html: Removed.

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

LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/fast/dom/HTMLLinkElement/cachedresource-types.html
LayoutTests/http/tests/misc/link-rel-prefetch-and-subresource.html [deleted file]
LayoutTests/webarchive/test-link-rel-subresource-beforeload-expected.webarchive [deleted file]
LayoutTests/webarchive/test-link-rel-subresource-beforeload.html [deleted file]

index c283017..da35dc3 100644 (file)
@@ -1,3 +1,19 @@
+2019-07-09  Rob Buis  <rbuis@igalia.com>
+
+        Remove rel=subresource tests
+        https://bugs.webkit.org/show_bug.cgi?id=199616
+
+        Reviewed by Ryosuke Niwa.
+
+        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-subresource-beforeload-expected.webarchive: Removed.
+        * webarchive/test-link-rel-subresource-beforeload.html: Removed.
+
 2019-07-09  Antoine Quint  <graouts@apple.com>
 
         [Pointer Events] Scroll indicators should not show for scrollable content with touch-action: none
index 7b4fbd6..aeb9ac2 100644 (file)
@@ -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.
index 9cbb575..545b1ad 100644 (file)
@@ -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 (file)
index b724bbe..0000000
+++ /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-subresource-beforeload-expected.webarchive b/LayoutTests/webarchive/test-link-rel-subresource-beforeload-expected.webarchive
deleted file mode 100644 (file)
index 6b256b0..0000000
+++ /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>&lt;html&gt;&lt;head&gt;
-&lt;script&gt;
-function runTest()
-{
-    if (window.testRunner) {
-        testRunner.dumpDOMAsWebArchive();
-        testRunner.queueReload();
-    }
-}
-&lt;/script&gt;
-&lt;/head&gt;
-&lt;body onload="runTest()"&gt;
-&lt;div id="console"&gt;&lt;div style="font-family: monospace; color: green;"&gt;PASS&lt;/div&gt;&lt;/div&gt;
-&lt;script&gt;
-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);
-}
-&lt;/script&gt;
-&lt;p&gt;This test should have a green 'PASS' just above this line.  If it doesn't, you failed.
-&lt;link rel="subresource" onbeforeload="print('PASS','green');return false" href="resources/favicon.ico" type="image/x-icon"&gt;
-
-
-&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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 (file)
index 1898a7a..0000000
+++ /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>