OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/fileapi/file_system_path_manager.h" | 5 #include "webkit/fileapi/file_system_path_manager.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/message_loop_proxy.h" |
10 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" |
11 #include "base/scoped_callback_factory.h" | 12 #include "base/scoped_callback_factory.h" |
12 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
13 #include "base/scoped_temp_dir.h" | 14 #include "base/scoped_temp_dir.h" |
14 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
16 | 17 |
17 using namespace fileapi; | 18 using namespace fileapi; |
18 | 19 |
19 namespace { | 20 namespace { |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 TEST_F(FileSystemPathManagerTest, IsRestrictedName) { | 418 TEST_F(FileSystemPathManagerTest, IsRestrictedName) { |
418 scoped_ptr<FileSystemPathManager> manager(NewPathManager(false, false)); | 419 scoped_ptr<FileSystemPathManager> manager(NewPathManager(false, false)); |
419 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kIsRestrictedNameTestCases); ++i) { | 420 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kIsRestrictedNameTestCases); ++i) { |
420 SCOPED_TRACE(testing::Message() << "IsRestrictedName #" << i << " " | 421 SCOPED_TRACE(testing::Message() << "IsRestrictedName #" << i << " " |
421 << kIsRestrictedNameTestCases[i].name); | 422 << kIsRestrictedNameTestCases[i].name); |
422 FilePath name(kIsRestrictedNameTestCases[i].name); | 423 FilePath name(kIsRestrictedNameTestCases[i].name); |
423 EXPECT_EQ(kIsRestrictedNameTestCases[i].expected_dangerous, | 424 EXPECT_EQ(kIsRestrictedNameTestCases[i].expected_dangerous, |
424 manager->IsRestrictedFileName(name)); | 425 manager->IsRestrictedFileName(name)); |
425 } | 426 } |
426 } | 427 } |
OLD | NEW |