Revert "Prerender: Run WPT for CSP with target hint"

This reverts commit 195504db54e81c95256097493b65140314be9d10.

Reason for revert: Breaks tests on mac builders

First failed build:

https://ci.chromium.org/ui/p/chromium/builders/ci/mac12-arm64-rel-tests/15213/overview

Original change's description:
> Prerender: Run WPT for CSP with target hint
>
> Bug: 1501674
> Change-Id: I7428467793000f1f37acdcde0b5310a9a3b364d7
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5043782
> Reviewed-by: Lingqi Chi <lingqi@chromium.org>
> Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1226729}

Bug: 1503635
Change-Id: If7314c3814251fe6d92191e3deab3249c7396d2a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5043730
Owners-Override: Andreea Costinas <acostinas@google.com>
Reviewed-by: Andreea Costinas <acostinas@google.com>
Reviewed-by: Oleg Davydov <burunduk@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Oleg Davydov <burunduk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1226765}
diff --git a/speculation-rules/prerender/csp-script-src-elem-inline-speculation-rules.html b/speculation-rules/prerender/csp-script-src-elem-inline-speculation-rules.html
index fa8a2cc..6268918 100644
--- a/speculation-rules/prerender/csp-script-src-elem-inline-speculation-rules.html
+++ b/speculation-rules/prerender/csp-script-src-elem-inline-speculation-rules.html
@@ -1,6 +1,4 @@
 <!DOCTYPE html>
-<meta name="variant" content="?target_hint=_self">
-<meta name="variant" content="?target_hint=_blank">
 <meta name="timeout" content="long">
 <script src="/common/utils.js"></script>
 <script src="/resources/testharness.js"></script>
@@ -12,9 +10,6 @@
 <script>
 setup(() => assertSpeculationRulesIsSupported());
 
-const params = new URLSearchParams(window.location.search);
-const target_hint = params.get('target_hint');
-
 promise_test(async t => {
   // The key used for storing a test result in the server.
   const key = token();
@@ -22,7 +17,7 @@
   // Open the test runner in a popup - it will prerender itself, record the
   // test results, and send them back to this harness.
   const url =
-    `resources/csp-script-src-elem-inline-speculation-rules.html?key=${key}&target_hint=${target_hint}`;
+    `resources/csp-script-src-elem-inline-speculation-rules.html?key=${key}`;
   window.open(url, '_blank', 'noopener');
 
   // Wait until the test sends us the results.
diff --git a/speculation-rules/prerender/csp-script-src-inline-speculation-rules.html b/speculation-rules/prerender/csp-script-src-inline-speculation-rules.html
index b2f451d..6c3a817 100644
--- a/speculation-rules/prerender/csp-script-src-inline-speculation-rules.html
+++ b/speculation-rules/prerender/csp-script-src-inline-speculation-rules.html
@@ -1,7 +1,5 @@
 <!DOCTYPE html>
 <meta name="timeout" content="long">
-<meta name="variant" content="?target_hint=_self">
-<meta name="variant" content="?target_hint=_blank">
 <script src="/common/utils.js"></script>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
@@ -12,9 +10,6 @@
 <script>
 setup(() => assertSpeculationRulesIsSupported());
 
-const params = new URLSearchParams(window.location.search);
-const target_hint = params.get('target_hint');
-
 promise_test(async t => {
   // The key used for storing a test result in the server.
   const key = token();
@@ -22,7 +17,7 @@
   // Open the test runner in a popup - it will prerender itself, record the
   // test results, and send them back to this harness.
   const url =
-    `resources/csp-script-src-inline-speculation-rules.html?key=${key}&target_hint=${target_hint}`;
+    `resources/csp-script-src-inline-speculation-rules.html?key=${key}`;
   window.open(url, '_blank', 'noopener');
 
   // Wait until the test sends us the results.
diff --git a/speculation-rules/prerender/csp-script-src-self.html b/speculation-rules/prerender/csp-script-src-self.html
index 0f9045d..46fbfd7 100644
--- a/speculation-rules/prerender/csp-script-src-self.html
+++ b/speculation-rules/prerender/csp-script-src-self.html
@@ -1,6 +1,4 @@
 <!DOCTYPE html>
-<meta name="variant" content="?target_hint=_self">
-<meta name="variant" content="?target_hint=_blank">
 <meta name="timeout" content="long">
 <script src="/common/utils.js"></script>
 <script src="/resources/testharness.js"></script>
@@ -12,9 +10,6 @@
 <script>
 setup(() => assertSpeculationRulesIsSupported());
 
-const params = new URLSearchParams(window.location.search);
-const target_hint = params.get('target_hint');
-
 promise_test(async t => {
   // The key used for storing a test result in the server.
   const key = token();
@@ -22,7 +17,7 @@
   // Open the test runner in a popup - it will prerender itself, record the
   // test results, and send them back to this harness.
   const url =
-    `resources/csp-script-src-self.html?key=${key}&target_hint=${target_hint}`;
+    `resources/csp-script-src-self.html?key=${key}`;
   window.open(url, '_blank', 'noopener');
 
   // Wait until the test sends us the results.
diff --git a/speculation-rules/prerender/csp-script-src-strict-dynamic.html b/speculation-rules/prerender/csp-script-src-strict-dynamic.html
index b27e802..d84ea3e 100644
--- a/speculation-rules/prerender/csp-script-src-strict-dynamic.html
+++ b/speculation-rules/prerender/csp-script-src-strict-dynamic.html
@@ -1,6 +1,4 @@
 <!DOCTYPE html>
-<meta name="variant" content="?target_hint=_self">
-<meta name="variant" content="?target_hint=_blank">
 <meta name="timeout" content="long">
 <script src="/common/utils.js"></script>
 <script src="/resources/testharness.js"></script>
@@ -12,9 +10,6 @@
 <script>
 setup(() => assertSpeculationRulesIsSupported());
 
-const params = new URLSearchParams(window.location.search);
-const target_hint = params.get('target_hint');
-
 promise_test(async t => {
   // The key used for storing a test result in the server.
   const key = token();
@@ -22,7 +17,7 @@
   // Open the test runner in a popup - it will prerender itself, record the
   // test results, and send them back to this harness.
   const url =
-    `resources/csp-script-src-strict-dynamic.html?key=${key}&target_hint=${target_hint}`;
+    `resources/csp-script-src-strict-dynamic.html?key=${key}`;
   window.open(url, '_blank', 'noopener');
 
   // Wait until the test sends us the results.
diff --git a/speculation-rules/prerender/csp-script-src-unsafe-inline.html b/speculation-rules/prerender/csp-script-src-unsafe-inline.html
index cbe47cf..ea2879b 100644
--- a/speculation-rules/prerender/csp-script-src-unsafe-inline.html
+++ b/speculation-rules/prerender/csp-script-src-unsafe-inline.html
@@ -1,6 +1,4 @@
 <!DOCTYPE html>
-<meta name="variant" content="?target_hint=_self">
-<meta name="variant" content="?target_hint=_blank">
 <meta name="timeout" content="long">
 <script src="/common/utils.js"></script>
 <script src="/resources/testharness.js"></script>
@@ -12,9 +10,6 @@
 <script>
 setup(() => assertSpeculationRulesIsSupported());
 
-const params = new URLSearchParams(window.location.search);
-const target_hint = params.get('target_hint');
-
 promise_test(async t => {
   // The key used for storing a test result in the server.
   const key = token();
@@ -22,7 +17,7 @@
   // Open the test runner in a popup - it will prerender itself, record the
   // test results, and send them back to this harness.
   const url =
-    `resources/csp-script-src-unsafe-inline.html?key=${key}&target_hint=${target_hint}`;
+    `resources/csp-script-src-unsafe-inline.html?key=${key}`;
   window.open(url, '_blank', 'noopener');
 
   // Wait until the test sends us the results.
diff --git a/speculation-rules/prerender/resources/csp-script-src.js b/speculation-rules/prerender/resources/csp-script-src.js
index 8927efb..866acaa 100644
--- a/speculation-rules/prerender/resources/csp-script-src.js
+++ b/speculation-rules/prerender/resources/csp-script-src.js
@@ -3,10 +3,6 @@
 // Take a key used for storing a test result in the server.
 const key = params.get('key');
 
-// Take a target hint to decide a target context for prerendering.
-const target_hint = params.get('target_hint');
-const rule_extras = {target_hint};
-
 // Speculation rules injection is blocked in the csp-script-src 'self' test.
 const block = location.pathname.endsWith('csp-script-src-self.html');
 
@@ -41,7 +37,7 @@
     });
   }
 
-  startPrerendering(url.toString(), rule_extras);
+  startPrerendering(url.toString());
 
   // Wait until the prerendered page signals us it's ready to close.
   nextValueFromServer(done_key).then(() => {