| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "googleurl/src/gurl.h" | |
| 7 #include "net/base/mime_sniffer.h" | 6 #include "net/base/mime_sniffer.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "url/gurl.h" |
| 9 | 9 |
| 10 namespace net { | 10 namespace net { |
| 11 | 11 |
| 12 struct SnifferTest { | 12 struct SnifferTest { |
| 13 const char* content; | 13 const char* content; |
| 14 size_t content_len; | 14 size_t content_len; |
| 15 std::string url; | 15 std::string url; |
| 16 std::string type_hint; | 16 std::string type_hint; |
| 17 const char* mime_type; | 17 const char* mime_type; |
| 18 }; | 18 }; |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 const char kAACTestData[] = | 478 const char kAACTestData[] = |
| 479 "\xff\xf1\x50\x80\x02\x20\xb0\x23\x0a\x83\x20\x7d\x61\x90\x3e\xb1"; | 479 "\xff\xf1\x50\x80\x02\x20\xb0\x23\x0a\x83\x20\x7d\x61\x90\x3e\xb1"; |
| 480 EXPECT_TRUE(SniffMimeTypeFromLocalData(kAACTestData, | 480 EXPECT_TRUE(SniffMimeTypeFromLocalData(kAACTestData, |
| 481 sizeof(kAACTestData), | 481 sizeof(kAACTestData), |
| 482 &mime_type)); | 482 &mime_type)); |
| 483 EXPECT_EQ("audio/mpeg", mime_type); | 483 EXPECT_EQ("audio/mpeg", mime_type); |
| 484 mime_type.clear(); | 484 mime_type.clear(); |
| 485 } | 485 } |
| 486 | 486 |
| 487 } // namespace net | 487 } // namespace net |
| OLD | NEW |