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

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

Issue 254983006: Fix: Adding list of supported codecs for MP4 containers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments Created 6 years, 7 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
« net/base/mime_util.cc ('K') | « 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 EXPECT_TRUE(IsStrictMediaMimeType("audio/x-wav")); 106 EXPECT_TRUE(IsStrictMediaMimeType("audio/x-wav"));
107 107
108 EXPECT_TRUE(IsStrictMediaMimeType("video/ogg")); 108 EXPECT_TRUE(IsStrictMediaMimeType("video/ogg"));
109 EXPECT_TRUE(IsStrictMediaMimeType("audio/ogg")); 109 EXPECT_TRUE(IsStrictMediaMimeType("audio/ogg"));
110 EXPECT_TRUE(IsStrictMediaMimeType("application/ogg")); 110 EXPECT_TRUE(IsStrictMediaMimeType("application/ogg"));
111 111
112 EXPECT_TRUE(IsStrictMediaMimeType("audio/mpeg")); 112 EXPECT_TRUE(IsStrictMediaMimeType("audio/mpeg"));
113 EXPECT_TRUE(IsStrictMediaMimeType("audio/mp3")); 113 EXPECT_TRUE(IsStrictMediaMimeType("audio/mp3"));
114 EXPECT_TRUE(IsStrictMediaMimeType("audio/x-mp3")); 114 EXPECT_TRUE(IsStrictMediaMimeType("audio/x-mp3"));
115 115
116 // TODO(amogh.bihani): These will be fixed http://crbug.com/53193 116 EXPECT_TRUE(IsStrictMediaMimeType("video/mp4"));
117 EXPECT_FALSE(IsStrictMediaMimeType("video/mp4")); 117 EXPECT_TRUE(IsStrictMediaMimeType("video/x-m4v"));
118 EXPECT_FALSE(IsStrictMediaMimeType("video/x-m4v")); 118 EXPECT_TRUE(IsStrictMediaMimeType("audio/mp4"));
119 EXPECT_FALSE(IsStrictMediaMimeType("audio/mp4")); 119 EXPECT_TRUE(IsStrictMediaMimeType("audio/x-m4a"));
120 EXPECT_FALSE(IsStrictMediaMimeType("audio/x-m4a"));
121 120
122 EXPECT_FALSE(IsStrictMediaMimeType("application/x-mpegurl")); 121 EXPECT_TRUE(IsStrictMediaMimeType("application/x-mpegurl"));
acolwell GONE FROM CHROMIUM 2014/05/22 20:21:42 I would expect these to be only true for Android.
amogh.bihani 2014/05/23 10:57:29 Yes HLS is supported only on Android, but that wou
123 EXPECT_FALSE(IsStrictMediaMimeType("application/vnd.apple.mpegurl")); 122 EXPECT_TRUE(IsStrictMediaMimeType("application/vnd.apple.mpegurl"));
124 // ---------------------------------------------------------------------------
125 123
126 EXPECT_FALSE(IsStrictMediaMimeType("video/unknown")); 124 EXPECT_FALSE(IsStrictMediaMimeType("video/unknown"));
127 EXPECT_FALSE(IsStrictMediaMimeType("audio/unknown")); 125 EXPECT_FALSE(IsStrictMediaMimeType("audio/unknown"));
128 EXPECT_FALSE(IsStrictMediaMimeType("application/unknown")); 126 EXPECT_FALSE(IsStrictMediaMimeType("application/unknown"));
129 EXPECT_FALSE(IsStrictMediaMimeType("unknown/unknown")); 127 EXPECT_FALSE(IsStrictMediaMimeType("unknown/unknown"));
130 } 128 }
131 129
132 TEST(MimeUtilTest, MatchesMimeType) { 130 TEST(MimeUtilTest, MatchesMimeType) {
133 EXPECT_TRUE(MatchesMimeType("*", "video/x-mpeg")); 131 EXPECT_TRUE(MatchesMimeType("*", "video/x-mpeg"));
134 EXPECT_TRUE(MatchesMimeType("video/*", "video/x-mpeg")); 132 EXPECT_TRUE(MatchesMimeType("video/*", "video/x-mpeg"));
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 std::string post_data; 408 std::string post_data;
411 AddMultipartValueForUpload("value name", "value", "boundary", 409 AddMultipartValueForUpload("value name", "value", "boundary",
412 "content type", &post_data); 410 "content type", &post_data);
413 AddMultipartValueForUpload("value name", "value", "boundary", 411 AddMultipartValueForUpload("value name", "value", "boundary",
414 "", &post_data); 412 "", &post_data);
415 AddMultipartFinalDelimiterForUpload("boundary", &post_data); 413 AddMultipartFinalDelimiterForUpload("boundary", &post_data);
416 EXPECT_STREQ(ref_output, post_data.c_str()); 414 EXPECT_STREQ(ref_output, post_data.c_str());
417 } 415 }
418 416
419 } // namespace net 417 } // namespace net
OLDNEW
« net/base/mime_util.cc ('K') | « net/base/mime_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698