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

Side by Side Diff: base/files/file_locking_unittest.cc

Issue 1549853002: Switch to standard integer types in base/files/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 12 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
« no previous file with comments | « base/files/file_enumerator_win.cc ('k') | base/files/file_path.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/files/file.h" 6 #include "base/files/file.h"
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/macros.h"
9 #include "base/test/multiprocess_test.h" 10 #include "base/test/multiprocess_test.h"
10 #include "base/test/test_timeouts.h" 11 #include "base/test/test_timeouts.h"
11 #include "base/threading/platform_thread.h" 12 #include "base/threading/platform_thread.h"
12 #include "base/time/time.h" 13 #include "base/time/time.h"
13 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
14 #include "testing/multiprocess_func_list.h" 15 #include "testing/multiprocess_func_list.h"
15 16
16 using base::File; 17 using base::File;
17 using base::FilePath; 18 using base::FilePath;
18 19
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // Test that killing the process releases the lock. This should cover crashing. 217 // Test that killing the process releases the lock. This should cover crashing.
217 TEST_F(FileLockingTest, UnlockOnTerminate) { 218 TEST_F(FileLockingTest, UnlockOnTerminate) {
218 // The child will wait for an exit which never arrives. 219 // The child will wait for an exit which never arrives.
219 StartChildAndSignalLock(kExitUnlock); 220 StartChildAndSignalLock(kExitUnlock);
220 221
221 ASSERT_NE(File::FILE_OK, lock_file_.Lock()); 222 ASSERT_NE(File::FILE_OK, lock_file_.Lock());
222 ASSERT_TRUE(lock_child_.Terminate(0, true)); 223 ASSERT_TRUE(lock_child_.Terminate(0, true));
223 ASSERT_EQ(File::FILE_OK, lock_file_.Lock()); 224 ASSERT_EQ(File::FILE_OK, lock_file_.Lock());
224 ASSERT_EQ(File::FILE_OK, lock_file_.Unlock()); 225 ASSERT_EQ(File::FILE_OK, lock_file_.Unlock());
225 } 226 }
OLDNEW
« no previous file with comments | « base/files/file_enumerator_win.cc ('k') | base/files/file_path.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698