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

Side by Side Diff: chrome/browser/process_singleton_posix_unittest.cc

Issue 1548133002: Switch to standard integer types in chrome/browser/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/process_singleton.h" 5 #include "chrome/browser/process_singleton.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <signal.h> 8 #include <signal.h>
9 #include <stddef.h>
9 #include <sys/types.h> 10 #include <sys/types.h>
10 #include <sys/un.h> 11 #include <sys/un.h>
11 #include <sys/wait.h> 12 #include <sys/wait.h>
12 #include <unistd.h> 13 #include <unistd.h>
13 14
14 #include <string> 15 #include <string>
15 #include <vector> 16 #include <vector>
16 17
17 #include "base/bind.h" 18 #include "base/bind.h"
18 #include "base/command_line.h" 19 #include "base/command_line.h"
19 #include "base/files/file_path.h" 20 #include "base/files/file_path.h"
20 #include "base/files/file_util.h" 21 #include "base/files/file_util.h"
21 #include "base/files/scoped_temp_dir.h" 22 #include "base/files/scoped_temp_dir.h"
22 #include "base/location.h" 23 #include "base/location.h"
23 #include "base/posix/eintr_wrapper.h" 24 #include "base/posix/eintr_wrapper.h"
24 #include "base/single_thread_task_runner.h" 25 #include "base/single_thread_task_runner.h"
25 #include "base/strings/stringprintf.h" 26 #include "base/strings/stringprintf.h"
26 #include "base/synchronization/waitable_event.h" 27 #include "base/synchronization/waitable_event.h"
27 #include "base/test/test_timeouts.h" 28 #include "base/test/test_timeouts.h"
28 #include "base/test/thread_test_helper.h" 29 #include "base/test/thread_test_helper.h"
29 #include "base/threading/thread.h" 30 #include "base/threading/thread.h"
31 #include "build/build_config.h"
30 #include "chrome/common/chrome_constants.h" 32 #include "chrome/common/chrome_constants.h"
31 #include "content/public/test/test_browser_thread.h" 33 #include "content/public/test/test_browser_thread.h"
32 #include "net/base/net_util.h" 34 #include "net/base/net_util.h"
33 #include "testing/gtest/include/gtest/gtest.h" 35 #include "testing/gtest/include/gtest/gtest.h"
34 36
35 using content::BrowserThread; 37 using content::BrowserThread;
36 38
37 namespace { 39 namespace {
38 40
39 class ProcessSingletonPosixTest : public testing::Test { 41 class ProcessSingletonPosixTest : public testing::Test {
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 // Test that if there is an existing lock file, and it's not locked, we replace 423 // Test that if there is an existing lock file, and it's not locked, we replace
422 // it. 424 // it.
423 TEST_F(ProcessSingletonPosixTest, CreateReplacesOldMacLock) { 425 TEST_F(ProcessSingletonPosixTest, CreateReplacesOldMacLock) {
424 scoped_ptr<TestableProcessSingleton> process_singleton( 426 scoped_ptr<TestableProcessSingleton> process_singleton(
425 CreateProcessSingleton()); 427 CreateProcessSingleton());
426 EXPECT_EQ(0, base::WriteFile(lock_path_, "", 0)); 428 EXPECT_EQ(0, base::WriteFile(lock_path_, "", 0));
427 EXPECT_TRUE(process_singleton->Create()); 429 EXPECT_TRUE(process_singleton->Create());
428 VerifyFiles(); 430 VerifyFiles();
429 } 431 }
430 #endif // defined(OS_MACOSX) 432 #endif // defined(OS_MACOSX)
OLDNEW
« no previous file with comments | « chrome/browser/process_singleton_posix.cc ('k') | chrome/browser/process_singleton_startup_lock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698