OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "platform/MIMETypeRegistry.h" | 5 #include "platform/network/mime/MIMETypeRegistry.h" |
6 | 6 |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 | 8 |
9 namespace blink { | 9 namespace blink { |
10 | 10 |
11 TEST(MIMETypeRegistryTest, MimeTypeTest) { | 11 TEST(MIMETypeRegistryTest, MimeTypeTest) { |
12 EXPECT_TRUE(MIMETypeRegistry::isSupportedImagePrefixedMIMEType("image/gif")); | 12 EXPECT_TRUE(MIMETypeRegistry::isSupportedImagePrefixedMIMEType("image/gif")); |
13 EXPECT_TRUE(MIMETypeRegistry::isSupportedImageResourceMIMEType("image/gif")); | 13 EXPECT_TRUE(MIMETypeRegistry::isSupportedImageResourceMIMEType("image/gif")); |
14 EXPECT_TRUE(MIMETypeRegistry::isSupportedImagePrefixedMIMEType("Image/Gif")); | 14 EXPECT_TRUE(MIMETypeRegistry::isSupportedImagePrefixedMIMEType("Image/Gif")); |
15 EXPECT_TRUE(MIMETypeRegistry::isSupportedImageResourceMIMEType("Image/Gif")); | 15 EXPECT_TRUE(MIMETypeRegistry::isSupportedImageResourceMIMEType("Image/Gif")); |
(...skipping 12 matching lines...) Expand all Loading... |
28 // Since we've removed MIME type guessing based on plugin-declared file | 28 // Since we've removed MIME type guessing based on plugin-declared file |
29 // extensions, ensure that the MIMETypeRegistry already contains | 29 // extensions, ensure that the MIMETypeRegistry already contains |
30 // the extensions used by common PPAPI plugins. | 30 // the extensions used by common PPAPI plugins. |
31 EXPECT_EQ("application/pdf", | 31 EXPECT_EQ("application/pdf", |
32 MIMETypeRegistry::getWellKnownMIMETypeForExtension("pdf").utf8()); | 32 MIMETypeRegistry::getWellKnownMIMETypeForExtension("pdf").utf8()); |
33 EXPECT_EQ("application/x-shockwave-flash", | 33 EXPECT_EQ("application/x-shockwave-flash", |
34 MIMETypeRegistry::getWellKnownMIMETypeForExtension("swf").utf8()); | 34 MIMETypeRegistry::getWellKnownMIMETypeForExtension("swf").utf8()); |
35 } | 35 } |
36 | 36 |
37 } // namespace blink | 37 } // namespace blink |
OLD | NEW |