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

Unified Diff: content/child/simple_webmimeregistry_impl_unittest.cc

Issue 471913002: Added a method to detect all supported "image/*" MIME types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/simple_webmimeregistry_impl.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/simple_webmimeregistry_impl_unittest.cc
diff --git a/content/child/simple_webmimeregistry_impl_unittest.cc b/content/child/simple_webmimeregistry_impl_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..40d3bd5f06c18252a2959a24b73c55bea9e5fd3d
--- /dev/null
+++ b/content/child/simple_webmimeregistry_impl_unittest.cc
@@ -0,0 +1,21 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Tests for SimpleWebMimeRegistryImpl.
+
+#include "content/child/simple_webmimeregistry_impl.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/WebKit/public/platform/WebString.h"
+
+TEST(SimpleWebMimeRegistryImpl, mimeTypeTest)
+{
+ content::SimpleWebMimeRegistryImpl registry;
+
+ EXPECT_TRUE(registry.supportsImagePrefixedMIMEType("image/gif"));
+ EXPECT_TRUE(registry.supportsImagePrefixedMIMEType("image/svg+xml"));
+ EXPECT_FALSE(registry.supportsImageMIMEType("image/svg+xml"));
+ EXPECT_TRUE(registry.supportsImageMIMEType("image/gif"));
+}
+
« no previous file with comments | « content/child/simple_webmimeregistry_impl.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698