| OLD | NEW |
| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 | 224 |
| 225 #if defined(USE_PROPRIETARY_CODECS) | 225 #if defined(USE_PROPRIETARY_CODECS) |
| 226 EXPECT_TRUE(IsSupportedMediaMimeType("audio/mp4")); | 226 EXPECT_TRUE(IsSupportedMediaMimeType("audio/mp4")); |
| 227 EXPECT_TRUE(IsSupportedMediaMimeType("audio/x-m4a")); | 227 EXPECT_TRUE(IsSupportedMediaMimeType("audio/x-m4a")); |
| 228 EXPECT_TRUE(IsSupportedMediaMimeType("video/mp4")); | 228 EXPECT_TRUE(IsSupportedMediaMimeType("video/mp4")); |
| 229 EXPECT_TRUE(IsSupportedMediaMimeType("video/x-m4v")); | 229 EXPECT_TRUE(IsSupportedMediaMimeType("video/x-m4v")); |
| 230 | 230 |
| 231 EXPECT_TRUE(IsSupportedMediaMimeType("audio/mp3")); | 231 EXPECT_TRUE(IsSupportedMediaMimeType("audio/mp3")); |
| 232 EXPECT_TRUE(IsSupportedMediaMimeType("audio/x-mp3")); | 232 EXPECT_TRUE(IsSupportedMediaMimeType("audio/x-mp3")); |
| 233 EXPECT_TRUE(IsSupportedMediaMimeType("audio/mpeg")); | 233 EXPECT_TRUE(IsSupportedMediaMimeType("audio/mpeg")); |
| 234 |
| 235 #if defined(ENABLE_MPEG2TS_STREAM_PARSER) |
| 236 EXPECT_TRUE(IsSupportedMediaMimeType("video/mp2t")); |
| 237 #else |
| 238 EXPECT_FALSE(IsSupportedMediaMimeType("video/mp2t")); |
| 239 #endif |
| 234 #else | 240 #else |
| 235 EXPECT_FALSE(IsSupportedMediaMimeType("audio/mp4")); | 241 EXPECT_FALSE(IsSupportedMediaMimeType("audio/mp4")); |
| 236 EXPECT_FALSE(IsSupportedMediaMimeType("audio/x-m4a")); | 242 EXPECT_FALSE(IsSupportedMediaMimeType("audio/x-m4a")); |
| 237 EXPECT_FALSE(IsSupportedMediaMimeType("video/mp4")); | 243 EXPECT_FALSE(IsSupportedMediaMimeType("video/mp4")); |
| 238 EXPECT_FALSE(IsSupportedMediaMimeType("video/x-m4v")); | 244 EXPECT_FALSE(IsSupportedMediaMimeType("video/x-m4v")); |
| 239 | 245 |
| 240 EXPECT_FALSE(IsSupportedMediaMimeType("audio/mp3")); | 246 EXPECT_FALSE(IsSupportedMediaMimeType("audio/mp3")); |
| 241 EXPECT_FALSE(IsSupportedMediaMimeType("audio/x-mp3")); | 247 EXPECT_FALSE(IsSupportedMediaMimeType("audio/x-mp3")); |
| 242 EXPECT_FALSE(IsSupportedMediaMimeType("audio/mpeg")); | 248 EXPECT_FALSE(IsSupportedMediaMimeType("audio/mpeg")); |
| 243 #endif // USE_PROPRIETARY_CODECS | 249 #endif // USE_PROPRIETARY_CODECS |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 std::string post_data; | 453 std::string post_data; |
| 448 AddMultipartValueForUpload("value name", "value", "boundary", | 454 AddMultipartValueForUpload("value name", "value", "boundary", |
| 449 "content type", &post_data); | 455 "content type", &post_data); |
| 450 AddMultipartValueForUpload("value name", "value", "boundary", | 456 AddMultipartValueForUpload("value name", "value", "boundary", |
| 451 "", &post_data); | 457 "", &post_data); |
| 452 AddMultipartFinalDelimiterForUpload("boundary", &post_data); | 458 AddMultipartFinalDelimiterForUpload("boundary", &post_data); |
| 453 EXPECT_STREQ(ref_output, post_data.c_str()); | 459 EXPECT_STREQ(ref_output, post_data.c_str()); |
| 454 } | 460 } |
| 455 | 461 |
| 456 } // namespace net | 462 } // namespace net |
| OLD | NEW |