OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 <signal.h> | 7 #include <signal.h> |
8 #include <sys/types.h> | 8 #include <sys/types.h> |
9 #include <sys/wait.h> | 9 #include <sys/wait.h> |
10 #include <unistd.h> | 10 #include <unistd.h> |
11 | 11 |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/bind.h" | 15 #include "base/bind.h" |
16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
17 #include "base/files/file_path.h" | 17 #include "base/files/file_path.h" |
18 #include "base/files/scoped_temp_dir.h" | 18 #include "base/files/scoped_temp_dir.h" |
19 #include "base/message_loop/message_loop.h" | 19 #include "base/message_loop/message_loop.h" |
20 #include "base/process_util.h" | |
21 #include "base/strings/stringprintf.h" | 20 #include "base/strings/stringprintf.h" |
22 #include "base/synchronization/waitable_event.h" | 21 #include "base/synchronization/waitable_event.h" |
23 #include "base/test/test_timeouts.h" | 22 #include "base/test/test_timeouts.h" |
24 #include "base/test/thread_test_helper.h" | 23 #include "base/test/thread_test_helper.h" |
25 #include "base/threading/thread.h" | 24 #include "base/threading/thread.h" |
26 #include "chrome/common/chrome_constants.h" | 25 #include "chrome/common/chrome_constants.h" |
27 #include "content/public/test/test_browser_thread.h" | 26 #include "content/public/test/test_browser_thread.h" |
28 #include "net/base/net_util.h" | 27 #include "net/base/net_util.h" |
29 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
30 | 29 |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 | 389 |
391 // Also change the hostname, so the remote does not retry. | 390 // Also change the hostname, so the remote does not retry. |
392 EXPECT_EQ(0, unlink(lock_path_.value().c_str())); | 391 EXPECT_EQ(0, unlink(lock_path_.value().c_str())); |
393 EXPECT_EQ(0, symlink("FAKEFOOHOST-1234", lock_path_.value().c_str())); | 392 EXPECT_EQ(0, symlink("FAKEFOOHOST-1234", lock_path_.value().c_str())); |
394 | 393 |
395 std::string url("about:blank"); | 394 std::string url("about:blank"); |
396 EXPECT_EQ(ProcessSingleton::PROFILE_IN_USE, | 395 EXPECT_EQ(ProcessSingleton::PROFILE_IN_USE, |
397 NotifyOtherProcessOrCreate(url, TestTimeouts::action_timeout())); | 396 NotifyOtherProcessOrCreate(url, TestTimeouts::action_timeout())); |
398 } | 397 } |
399 | 398 |
OLD | NEW |