summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/file_manager/mime_util_unittest.cc
blob: f41eaa3b136b7e919d3d79427d9f8fa3f6858c8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright 2013 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.

#include "chrome/browser/chromeos/file_manager/mime_util.h"

#include "base/files/file_path.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace file_manager {
namespace util {

TEST(FileManagerMimeUtilTest, GetMimeTypeForPath) {
  EXPECT_EQ("image/jpeg",
            GetMimeTypeForPath(base::FilePath::FromUTF8Unsafe("foo.jpg")));
  EXPECT_EQ("image/jpeg",
            GetMimeTypeForPath(base::FilePath::FromUTF8Unsafe("FOO.JPG")));
  EXPECT_EQ("",
            GetMimeTypeForPath(base::FilePath::FromUTF8Unsafe("foo.zzz")));
}

}  // namespace util
}  // namespace file_manager