Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1039)

Side by Side Diff: net/base/mime_util_unittest.cc

Issue 130853002: Add mime types for HLS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/base/mime_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/strings/string_split.h" 6 #include "base/strings/string_split.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "net/base/mime_util.h" 8 #include "net/base/mime_util.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 EXPECT_FALSE(IsSupportedNonImageMimeType("text/vcard")); 73 EXPECT_FALSE(IsSupportedNonImageMimeType("text/vcard"));
74 EXPECT_FALSE(IsSupportedNonImageMimeType("application/virus")); 74 EXPECT_FALSE(IsSupportedNonImageMimeType("application/virus"));
75 EXPECT_TRUE(IsSupportedNonImageMimeType("application/x-x509-user-cert")); 75 EXPECT_TRUE(IsSupportedNonImageMimeType("application/x-x509-user-cert"));
76 EXPECT_TRUE(IsSupportedNonImageMimeType("application/json")); 76 EXPECT_TRUE(IsSupportedNonImageMimeType("application/json"));
77 EXPECT_TRUE(IsSupportedNonImageMimeType("application/+json")); 77 EXPECT_TRUE(IsSupportedNonImageMimeType("application/+json"));
78 EXPECT_TRUE(IsSupportedNonImageMimeType("application/x-suggestions+json")); 78 EXPECT_TRUE(IsSupportedNonImageMimeType("application/x-suggestions+json"));
79 EXPECT_TRUE(IsSupportedNonImageMimeType("application/x-s+json;x=2")); 79 EXPECT_TRUE(IsSupportedNonImageMimeType("application/x-s+json;x=2"));
80 #if defined(OS_ANDROID) 80 #if defined(OS_ANDROID)
81 EXPECT_TRUE(IsSupportedNonImageMimeType("application/x-x509-ca-cert")); 81 EXPECT_TRUE(IsSupportedNonImageMimeType("application/x-x509-ca-cert"));
82 EXPECT_TRUE(IsSupportedNonImageMimeType("application/x-pkcs12")); 82 EXPECT_TRUE(IsSupportedNonImageMimeType("application/x-pkcs12"));
83 EXPECT_TRUE(IsSupportedMediaMimeType("application/vnd.apple.mpegurl"));
84 EXPECT_TRUE(IsSupportedMediaMimeType("application/x-mpegurl"));
83 #endif 85 #endif
84 86
85 EXPECT_TRUE(IsSupportedMimeType("image/jpeg")); 87 EXPECT_TRUE(IsSupportedMimeType("image/jpeg"));
86 EXPECT_FALSE(IsSupportedMimeType("image/lolcat")); 88 EXPECT_FALSE(IsSupportedMimeType("image/lolcat"));
87 EXPECT_TRUE(IsSupportedMimeType("text/html")); 89 EXPECT_TRUE(IsSupportedMimeType("text/html"));
88 EXPECT_TRUE(IsSupportedMimeType("text/banana")); 90 EXPECT_TRUE(IsSupportedMimeType("text/banana"));
89 EXPECT_FALSE(IsSupportedMimeType("text/vcard")); 91 EXPECT_FALSE(IsSupportedMimeType("text/vcard"));
90 EXPECT_FALSE(IsSupportedMimeType("application/virus")); 92 EXPECT_FALSE(IsSupportedMimeType("application/virus"));
91 EXPECT_FALSE(IsSupportedMimeType("application/x-json")); 93 EXPECT_FALSE(IsSupportedMimeType("application/x-json"));
92 EXPECT_FALSE(IsSupportedNonImageMimeType("application/vnd.doc;x=y+json")); 94 EXPECT_FALSE(IsSupportedNonImageMimeType("application/vnd.doc;x=y+json"));
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 std::string post_data; 321 std::string post_data;
320 AddMultipartValueForUpload("value name", "value", "boundary", 322 AddMultipartValueForUpload("value name", "value", "boundary",
321 "content type", &post_data); 323 "content type", &post_data);
322 AddMultipartValueForUpload("value name", "value", "boundary", 324 AddMultipartValueForUpload("value name", "value", "boundary",
323 "", &post_data); 325 "", &post_data);
324 AddMultipartFinalDelimiterForUpload("boundary", &post_data); 326 AddMultipartFinalDelimiterForUpload("boundary", &post_data);
325 EXPECT_STREQ(ref_output, post_data.c_str()); 327 EXPECT_STREQ(ref_output, post_data.c_str());
326 } 328 }
327 329
328 } // namespace net 330 } // namespace net
OLDNEW
« no previous file with comments | « net/base/mime_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698