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

Unified Diff: net/base/mime_util_unittest.cc

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/mime_util.cc ('k') | net/base/net_string_util_icu_alternatives_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/mime_util_unittest.cc
diff --git a/net/base/mime_util_unittest.cc b/net/base/mime_util_unittest.cc
index a3d9516ee07731342b6c99eec06afe58d264e1fe..a28c8b695d80e8af7a33c6fa1fef65b87c5d18d8 100644
--- a/net/base/mime_util_unittest.cc
+++ b/net/base/mime_util_unittest.cc
@@ -17,7 +17,7 @@ namespace net {
TEST(MimeUtilTest, ExtensionTest) {
const struct {
const base::FilePath::CharType* extension;
- const char* mime_type;
+ const char* const mime_type;
bool valid;
} tests[] = {
{ FILE_PATH_LITERAL("png"), "image/png", true },
@@ -44,7 +44,7 @@ TEST(MimeUtilTest, ExtensionTest) {
TEST(MimeUtilTest, FileTest) {
const struct {
const base::FilePath::CharType* file_path;
- const char* mime_type;
+ const char* const mime_type;
bool valid;
} tests[] = {
{ FILE_PATH_LITERAL("c:\\foo\\bar.css"), "text/css", true },
@@ -258,9 +258,9 @@ TEST(MimeUtilTest, CommonMediaMimeType) {
// results' length to 2.
TEST(MimeUtilTest, ParseCodecString) {
const struct {
- const char* original;
+ const char* const original;
size_t expected_size;
- const char* results[2];
+ const char* const results[2];
} tests[] = {
{ "\"bogus\"", 1, { "bogus" } },
{ "0", 1, { "0" } },
@@ -365,9 +365,9 @@ TEST(MimeUtilTest, TestIsValidTopLevelMimeType) {
TEST(MimeUtilTest, TestGetExtensionsForMimeType) {
const struct {
- const char* mime_type;
+ const char* const mime_type;
size_t min_expected_size;
- const char* contained_result;
+ const char* const contained_result;
} tests[] = {
{ "text/plain", 2, "txt" },
{ "*", 0, NULL },
@@ -427,12 +427,13 @@ TEST(MimeUtilTest, TestGetCertificateMimeTypeForMimeType) {
}
TEST(MimeUtilTest, TestAddMultipartValueForUpload) {
- const char* ref_output = "--boundary\r\nContent-Disposition: form-data;"
- " name=\"value name\"\r\nContent-Type: content type"
- "\r\n\r\nvalue\r\n"
- "--boundary\r\nContent-Disposition: form-data;"
- " name=\"value name\"\r\n\r\nvalue\r\n"
- "--boundary--\r\n";
+ const char ref_output[] =
+ "--boundary\r\nContent-Disposition: form-data;"
+ " name=\"value name\"\r\nContent-Type: content type"
+ "\r\n\r\nvalue\r\n"
+ "--boundary\r\nContent-Disposition: form-data;"
+ " name=\"value name\"\r\n\r\nvalue\r\n"
+ "--boundary--\r\n";
std::string post_data;
AddMultipartValueForUpload("value name", "value", "boundary",
"content type", &post_data);
« no previous file with comments | « net/base/mime_util.cc ('k') | net/base/net_string_util_icu_alternatives_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698