Ensure :active is removed on keyup for radios

Bug: 693907
Change-Id: I33fd612193420e463c34693f875d8c7e0f25431e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2466297
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816364}
diff --git a/html/semantics/forms/the-input-element/radio-double-activate-pseudo.html b/html/semantics/forms/the-input-element/radio-double-activate-pseudo.html
new file mode 100644
index 0000000..287dc7d
--- /dev/null
+++ b/html/semantics/forms/the-input-element/radio-double-activate-pseudo.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org">
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+
+<!-- This behavior is not explicitly specified. -->
+
+<input type=radio id=radioinput>
+
+<script>
+  promise_test(async () => {
+    await test_driver.send_keys(radioinput, ' ');
+    await test_driver.send_keys(radioinput, ' ');
+    assert_equals(document.querySelector(':active'), null,
+      `If the radio doesn't have the :active pseudo selector, nothing else should either.`);
+  }, `<input type=radio> shouldn't have the :active pseudo element after pressing the spacebar twice.`);
+</script>