COOP WPT: Typos fix and checks.

Typos in the expected opener state were completely disregarded,
allowing mistakes to slip through. We now check that we get something
that makes sense, catching a couple of trivial errors along the way.

Bug: 1318373
Change-Id: I3d5e909fd005faaacf6182354e4d61f241d13ac5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3683143
Commit-Queue: Arthur Hemery <ahemery@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1009514}
diff --git a/html/cross-origin-opener-policy/popup-unsafe-none-with-cross-origin.https.html b/html/cross-origin-opener-policy/popup-unsafe-none-with-cross-origin.https.html
index 26a273a..c776f44 100644
--- a/html/cross-origin-opener-policy/popup-unsafe-none-with-cross-origin.https.html
+++ b/html/cross-origin-opener-policy/popup-unsafe-none-with-cross-origin.https.html
@@ -14,7 +14,7 @@
   {
     "title": "popup with empty coop",
     "coop": "",
-    "opener": "preservedt"
+    "opener": "preserved"
   },
   {
     "title": "popup with coop unsafe-none",
diff --git a/html/cross-origin-opener-policy/popup-unspecified-with-cross-origin.https.html b/html/cross-origin-opener-policy/popup-unspecified-with-cross-origin.https.html
index 26a273a..c776f44 100644
--- a/html/cross-origin-opener-policy/popup-unspecified-with-cross-origin.https.html
+++ b/html/cross-origin-opener-policy/popup-unspecified-with-cross-origin.https.html
@@ -14,7 +14,7 @@
   {
     "title": "popup with empty coop",
     "coop": "",
-    "opener": "preservedt"
+    "opener": "preserved"
   },
   {
     "title": "popup with coop unsafe-none",
diff --git a/html/cross-origin-opener-policy/popup-unspecified-with-same-origin.https.html b/html/cross-origin-opener-policy/popup-unspecified-with-same-origin.https.html
index ca69369..7b3f4d9 100644
--- a/html/cross-origin-opener-policy/popup-unspecified-with-same-origin.https.html
+++ b/html/cross-origin-opener-policy/popup-unspecified-with-same-origin.https.html
@@ -14,7 +14,7 @@
   {
     "title": "popup with empty coop",
     "coop": "",
-    "opener": "preservedt"
+    "opener": "preserved"
   },
   {
     "title": "popup with coop unsafe-none",
diff --git a/html/cross-origin-opener-policy/popup-unspecified-with-same-site.https.html b/html/cross-origin-opener-policy/popup-unspecified-with-same-site.https.html
index 7360674..7d734fa 100644
--- a/html/cross-origin-opener-policy/popup-unspecified-with-same-site.https.html
+++ b/html/cross-origin-opener-policy/popup-unspecified-with-same-site.https.html
@@ -14,7 +14,7 @@
   {
     "title": "popup with empty coop",
     "coop": "",
-    "opener": "preservedt"
+    "opener": "preserved"
   },
   {
     "title": "popup with coop unsafe-none",
diff --git a/html/cross-origin-opener-policy/popup-with-structured-header.https.html b/html/cross-origin-opener-policy/popup-with-structured-header.https.html
index 4066595..729be3c 100644
--- a/html/cross-origin-opener-policy/popup-with-structured-header.https.html
+++ b/html/cross-origin-opener-policy/popup-with-structured-header.https.html
@@ -27,7 +27,7 @@
     "opener": "severed",
   }
 ].forEach(variant => {
-  popup_test(`Same-origin ${variant.title}`, SAME_ORIGIN, variant.coop, variant.same_origin_opener);
+  popup_test(`Same-origin ${variant.title}`, SAME_ORIGIN, variant.coop, variant.opener);
 });
 
 </script>
diff --git a/html/cross-origin-opener-policy/resources/popup-test.js b/html/cross-origin-opener-policy/resources/popup-test.js
index 4bf38a3..3da5ca1 100644
--- a/html/cross-origin-opener-policy/resources/popup-test.js
+++ b/html/cross-origin-opener-policy/resources/popup-test.js
@@ -77,6 +77,8 @@
                      'Popup has nulled opener?');
         break;
       }
+      default:
+        assert_unreached(true, "Unrecognized opener relationship: " + expected_opener_state);
     }
   }, description);
 }