Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 } | |
| OLD | NEW |