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

Side by Side Diff: chrome/browser/chromeos/arc/arc_downloads_watcher_service_unittest.cc

Issue 2379323002: arc: Exclude non-media files from Android media scanning. (Closed)
Patch Set: IWYU Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/chromeos/arc/arc_downloads_watcher_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/arc/arc_downloads_watcher_service.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
Yusuke Sato 2016/10/04 04:07:01 IWYU: #include "base/files/file_path.h" for FILE_P
Shuhei Takahashi 2016/10/04 04:21:14 Done.
8
9 namespace arc {
10
11 class ArcDownloadsWatcherServiceTest : public testing::Test {};
12
13 TEST_F(ArcDownloadsWatcherServiceTest, HasAndroidSupportedMediaExtension) {
Yusuke Sato 2016/10/04 04:07:01 This doesn't have to be TEST_F. If you agree, plea
Shuhei Takahashi 2016/10/04 04:21:14 Done.
14 EXPECT_TRUE(HasAndroidSupportedMediaExtension(
15 base::FilePath(FILE_PATH_LITERAL("/tmp/kitten.3g2"))));
16 EXPECT_TRUE(HasAndroidSupportedMediaExtension(
17 base::FilePath(FILE_PATH_LITERAL("/tmp/kitten.jpg"))));
18 EXPECT_TRUE(HasAndroidSupportedMediaExtension(
19 base::FilePath(FILE_PATH_LITERAL("/tmp/kitten.png"))));
20 EXPECT_TRUE(HasAndroidSupportedMediaExtension(
21 base::FilePath(FILE_PATH_LITERAL("/tmp/kitten.xmf"))));
22
23 EXPECT_TRUE(HasAndroidSupportedMediaExtension(
24 base::FilePath(FILE_PATH_LITERAL("/tmp/kitten.JPEG"))));
25 EXPECT_TRUE(HasAndroidSupportedMediaExtension(
26 base::FilePath(FILE_PATH_LITERAL("/tmp/kitten.cute.jpg"))));
27 EXPECT_TRUE(HasAndroidSupportedMediaExtension(
28 base::FilePath(FILE_PATH_LITERAL("/tmp/.kitten.jpg"))));
29
30 EXPECT_FALSE(HasAndroidSupportedMediaExtension(
31 base::FilePath(FILE_PATH_LITERAL("/tmp/kitten.txt"))));
32 EXPECT_FALSE(HasAndroidSupportedMediaExtension(
33 base::FilePath(FILE_PATH_LITERAL("/tmp/kitten.jpg.exe"))));
34 EXPECT_FALSE(HasAndroidSupportedMediaExtension(
35 base::FilePath(FILE_PATH_LITERAL("/tmp/kitten"))));
36 }
37
38 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_downloads_watcher_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698