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

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 TEST(FileSelectHelperTest, IsAcceptTypeValid) {
9 EXPECT_TRUE(FileSelectHelper::IsAcceptTypeValid("a/b"));
10 EXPECT_TRUE(FileSelectHelper::IsAcceptTypeValid("abc/def"));
11 EXPECT_TRUE(FileSelectHelper::IsAcceptTypeValid("abc/*"));
12 EXPECT_TRUE(FileSelectHelper::IsAcceptTypeValid(".a"));
13 EXPECT_TRUE(FileSelectHelper::IsAcceptTypeValid(".abc"));
14
15 EXPECT_FALSE(FileSelectHelper::IsAcceptTypeValid("."));
16 EXPECT_FALSE(FileSelectHelper::IsAcceptTypeValid("/"));
17 EXPECT_FALSE(FileSelectHelper::IsAcceptTypeValid("ABC/*"));
18 EXPECT_FALSE(FileSelectHelper::IsAcceptTypeValid("abc/def "));
19 }
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