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

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

Issue 2510523002: Assign "application/vnd.android.package-archive" type to APK files on ChromeOS. (Closed)
Patch Set: Assign "application/vnd.android.package-archive" type to APK files on ChromeOS. Created 4 years, 1 month 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_extension_chromeos.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/strings/string_split.h" 5 #include "base/strings/string_split.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "build/build_config.h" 7 #include "build/build_config.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 10 matching lines...) Expand all
21 const base::FilePath::StringType extension; 21 const base::FilePath::StringType extension;
22 const char* const mime_type; 22 const char* const mime_type;
23 bool valid; 23 bool valid;
24 } tests[] = { 24 } tests[] = {
25 {FILE_PATH_LITERAL("png"), "image/png", true}, 25 {FILE_PATH_LITERAL("png"), "image/png", true},
26 {FILE_PATH_LITERAL("PNG"), "image/png", true}, 26 {FILE_PATH_LITERAL("PNG"), "image/png", true},
27 {FILE_PATH_LITERAL("css"), "text/css", true}, 27 {FILE_PATH_LITERAL("css"), "text/css", true},
28 {FILE_PATH_LITERAL("pjp"), "image/jpeg", true}, 28 {FILE_PATH_LITERAL("pjp"), "image/jpeg", true},
29 {FILE_PATH_LITERAL("pjpeg"), "image/jpeg", true}, 29 {FILE_PATH_LITERAL("pjpeg"), "image/jpeg", true},
30 #if defined(OS_CHROMEOS) 30 #if defined(OS_CHROMEOS)
31 // These two are test cases for testing platform mime types on Chrome OS. 31 // These are test cases for testing platform mime types on Chrome OS.
32 {FILE_PATH_LITERAL("epub"), "application/epub+zip", true}, 32 {FILE_PATH_LITERAL("epub"), "application/epub+zip", true},
33 {FILE_PATH_LITERAL("apk"), "application/vnd.android.package-archive", true},
34 {FILE_PATH_LITERAL("zip"), "application/zip", true},
33 {FILE_PATH_LITERAL("ics"), "text/calendar", true}, 35 {FILE_PATH_LITERAL("ics"), "text/calendar", true},
34 #endif 36 #endif
35 #if defined(OS_ANDROID) 37 #if defined(OS_ANDROID)
36 {FILE_PATH_LITERAL("m3u8"), "application/x-mpegurl", true}, 38 {FILE_PATH_LITERAL("m3u8"), "application/x-mpegurl", true},
37 #endif 39 #endif
38 {FILE_PATH_LITERAL("not an extension / for sure"), "", false}, 40 {FILE_PATH_LITERAL("not an extension / for sure"), "", false},
39 {containsNullByte, "", false} 41 {containsNullByte, "", false}
40 }; 42 };
41 43
42 std::string mime_type; 44 std::string mime_type;
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 std::string post_data; 315 std::string post_data;
314 AddMultipartValueForUpload("value name", "value", "boundary", 316 AddMultipartValueForUpload("value name", "value", "boundary",
315 "content type", &post_data); 317 "content type", &post_data);
316 AddMultipartValueForUpload("value name", "value", "boundary", 318 AddMultipartValueForUpload("value name", "value", "boundary",
317 "", &post_data); 319 "", &post_data);
318 AddMultipartFinalDelimiterForUpload("boundary", &post_data); 320 AddMultipartFinalDelimiterForUpload("boundary", &post_data);
319 EXPECT_STREQ(ref_output, post_data.c_str()); 321 EXPECT_STREQ(ref_output, post_data.c_str());
320 } 322 }
321 323
322 } // namespace net 324 } // namespace net
OLDNEW
« no previous file with comments | « net/base/mime_extension_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698