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

Side by Side Diff: chrome/browser/file_select_helper_unittest.cc

Issue 10414085: Modified the pepper file chooser API to support filtering files by extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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/file_select_helper.h"
6 #include "testing/gtest/include/gtest/gtest.h"
7
8 typedef testing::Test FileSelectHelperTest;
9
10 TEST_F(FileSelectHelperTest, IsAcceptTypeValid) {
brettw 2012/05/29 17:57:28 Just use TEST (no _F) and remove the typedef above
11 EXPECT_TRUE(FileSelectHelper::IsAcceptTypeValid("a/b"));
12 EXPECT_TRUE(FileSelectHelper::IsAcceptTypeValid("abc/def"));
13 EXPECT_TRUE(FileSelectHelper::IsAcceptTypeValid("abc/*"));
14 EXPECT_TRUE(FileSelectHelper::IsAcceptTypeValid(".a"));
15 EXPECT_TRUE(FileSelectHelper::IsAcceptTypeValid(".abc"));
16
17 EXPECT_FALSE(FileSelectHelper::IsAcceptTypeValid("."));
18 EXPECT_FALSE(FileSelectHelper::IsAcceptTypeValid("/"));
19 EXPECT_FALSE(FileSelectHelper::IsAcceptTypeValid("ABC/*"));
20 EXPECT_FALSE(FileSelectHelper::IsAcceptTypeValid("abc/def "));
21 }
OLDNEW
« no previous file with comments | « chrome/browser/file_select_helper.cc ('k') | chrome/browser/ui/gtk/select_file_dialog_impl_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698