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

Side by Side Diff: content/child/simple_webmimeregistry_impl_unittest.cc

Issue 2444873002: Move WebMIMERegistry impl from //content to blink:platform/network/mime (Closed)
Patch Set: rebased Created 4 years, 1 month 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
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Tests for SimpleWebMimeRegistryImpl.
6
7 #include "content/child/simple_webmimeregistry_impl.h"
8
9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "third_party/WebKit/public/platform/WebString.h"
11
12 TEST(SimpleWebMimeRegistryImpl, mimeTypeTest)
13 {
14 content::SimpleWebMimeRegistryImpl registry;
15
16 EXPECT_TRUE(registry.supportsImagePrefixedMIMEType("image/gif"));
17 EXPECT_TRUE(registry.supportsImagePrefixedMIMEType("image/svg+xml"));
18 EXPECT_FALSE(registry.supportsImageMIMEType("image/svg+xml"));
19 EXPECT_TRUE(registry.supportsImageMIMEType("image/gif"));
20 }
21
22 TEST(SimpleWebMimeRegistryImpl, PluginMimeTypes) {
23 content::SimpleWebMimeRegistryImpl registry;
24
25 // Since we've removed MIME type guessing based on plugin-declared file
26 // extensions, ensure that the SimpleWebMimeRegistry already contains
27 // the extensions used by common PPAPI plugins.
28 EXPECT_EQ("application/pdf",
29 registry.wellKnownMimeTypeForExtension("pdf").utf8());
30 EXPECT_EQ("application/x-shockwave-flash",
31 registry.wellKnownMimeTypeForExtension("swf").utf8());
32 }
OLDNEW
« no previous file with comments | « content/child/simple_webmimeregistry_impl.cc ('k') | content/ppapi_plugin/ppapi_blink_platform_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698