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

Side by Side Diff: webkit/fileapi/file_system_path_manager_unittest.cc

Issue 6042009: Added WARN_UNUSED_RESULT to ScopedTempDir methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OSX build fix Created 9 years, 11 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
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/message_loop_proxy.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } // namespace 158 } // namespace
159 159
160 class FileSystemPathManagerTest : public testing::Test { 160 class FileSystemPathManagerTest : public testing::Test {
161 public: 161 public:
162 FileSystemPathManagerTest() 162 FileSystemPathManagerTest()
163 : callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { 163 : callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
164 } 164 }
165 165
166 void SetUp() { 166 void SetUp() {
167 data_dir_.reset(new ScopedTempDir); 167 data_dir_.reset(new ScopedTempDir);
168 data_dir_->CreateUniqueTempDir(); 168 ASSERT_TRUE(data_dir_->CreateUniqueTempDir());
169 ASSERT_TRUE(data_dir_->IsValid()); 169 ASSERT_TRUE(data_dir_->IsValid());
Scott Hess - ex-Googler 2011/01/06 19:17:26 Second ASSERT_TRUE() is probably now removable.
cbentzel 2011/01/06 19:20:33 Thanks. Done.
170 root_path_callback_status_ = false; 170 root_path_callback_status_ = false;
171 root_path_.clear(); 171 root_path_.clear();
172 file_system_name_.clear(); 172 file_system_name_.clear();
173 } 173 }
174 174
175 protected: 175 protected:
176 FileSystemPathManager* NewPathManager( 176 FileSystemPathManager* NewPathManager(
177 bool incognito, 177 bool incognito,
178 bool allow_file_access) { 178 bool allow_file_access) {
179 return new FileSystemPathManager( 179 return new FileSystemPathManager(
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 TEST_F(FileSystemPathManagerTest, IsRestrictedName) { 418 TEST_F(FileSystemPathManagerTest, IsRestrictedName) {
419 scoped_ptr<FileSystemPathManager> manager(NewPathManager(false, false)); 419 scoped_ptr<FileSystemPathManager> manager(NewPathManager(false, false));
420 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kIsRestrictedNameTestCases); ++i) { 420 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kIsRestrictedNameTestCases); ++i) {
421 SCOPED_TRACE(testing::Message() << "IsRestrictedName #" << i << " " 421 SCOPED_TRACE(testing::Message() << "IsRestrictedName #" << i << " "
422 << kIsRestrictedNameTestCases[i].name); 422 << kIsRestrictedNameTestCases[i].name);
423 FilePath name(kIsRestrictedNameTestCases[i].name); 423 FilePath name(kIsRestrictedNameTestCases[i].name);
424 EXPECT_EQ(kIsRestrictedNameTestCases[i].expected_dangerous, 424 EXPECT_EQ(kIsRestrictedNameTestCases[i].expected_dangerous,
425 manager->IsRestrictedFileName(name)); 425 manager->IsRestrictedFileName(name));
426 } 426 }
427 } 427 }
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_operation_unittest.cc ('k') | webkit/tools/test_shell/simple_database_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698