summaryrefslogtreecommitdiffstats
path: root/content/child/simple_webmimeregistry_impl_unittest.cc
blob: 40d3bd5f06c18252a2959a24b73c55bea9e5fd3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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"));
}