Fix mime parsing to require slash in mime

When migrating ParseContentType() from http_util to become
ParseMimeType() I noticed that code to check for a slash in the mime
type was inadvertently looking through the entire string.

Bug: 1202034
Change-Id: If78c75be6e302f6cc2314264bd68ec4090b81732
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2896198
Reviewed-by: Matt Menke <[email protected]>
Commit-Queue: Joel Hockey <[email protected]>
Cr-Commit-Position: refs/heads/master@{#883248}
diff --git a/net/base/mime_util_unittest.cc b/net/base/mime_util_unittest.cc
index 8314835..b0ae747a 100644
--- a/net/base/mime_util_unittest.cc
+++ b/net/base/mime_util_unittest.cc
@@ -244,8 +244,6 @@
       {"/ts", "/ts", {}},
       {"/s", "/s", {}},
       {"/", "/", {}},
-      // TODO(crbug.com/1202034): This is a bug and should fail.
-      {"t / s", "t", {}},
   };
   for (const auto& test : tests) {
     std::string mime_type;
@@ -258,6 +256,7 @@
            // Must have slash in mime type.
            "",
            "ts",
+           "t / s",
        }) {
     EXPECT_FALSE(ParseMimeType(type_str, nullptr, nullptr));
   }