[Local Network Access] Fix and assert undefined server in WPTs

I found this bug when I was working on enabling the same-origin
exemption. Server defined outside of the target object is useless. The
URL will be resolved to the default HTTPS local.

Since we always explicitly define servers in LNA WPTs, asserting it so
we don't make the same mistake again.

Change-Id: I8f397a6ae4c442fb283ba7c2fca86c89f2aa322b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4355133
Reviewed-by: Titouan Rigoudy <titouan@chromium.org>
Commit-Queue: Titouan Rigoudy <titouan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1120002}
diff --git a/fetch/local-network-access/redirect.https.window.js b/fetch/local-network-access/redirect.https.window.js
index f8a53ad..edbd5a1 100644
--- a/fetch/local-network-access/redirect.https.window.js
+++ b/fetch/local-network-access/redirect.https.window.js
@@ -365,8 +365,8 @@
     server: Server.HTTPS_LOCAL,
     treatAsPublic: true,
   },
-  server: Server.HTTPS_PRIVATE,
   target: {
+    server: Server.HTTPS_PRIVATE,
     behavior: {
       preflight: PreflightBehavior.noPnaHeader(token()),
       response: ResponseBehavior.allowCrossOrigin(),
diff --git a/fetch/local-network-access/resources/support.sub.js b/fetch/local-network-access/resources/support.sub.js
index c07fd2c..0cf3d25 100644
--- a/fetch/local-network-access/resources/support.sub.js
+++ b/fetch/local-network-access/resources/support.sub.js
@@ -205,6 +205,7 @@
 //   - `response`: The result of calling one of `ResponseBehavior`'s methods.
 //   - `redirect`: A URL to which the target should redirect GET requests.
 function preflightUrl({ server, behavior }) {
+  assert_not_equals(server, undefined, 'server');
   const options = {...server};
   if (behavior) {
     const { preflight, response, redirect } = behavior;