OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/chrome_process_singleton.h" | 5 #include "chrome/browser/chrome_process_singleton.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/files/scoped_temp_dir.h" | 11 #include "base/files/scoped_temp_dir.h" |
| 12 #include "build/build_config.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
13 | 14 |
14 namespace { | 15 namespace { |
15 | 16 |
16 bool ServerCallback(int* callback_count, | 17 bool ServerCallback(int* callback_count, |
17 const base::CommandLine& command_line, | 18 const base::CommandLine& command_line, |
18 const base::FilePath& current_directory) { | 19 const base::FilePath& current_directory) { |
19 ++(*callback_count); | 20 ++(*callback_count); |
20 return true; | 21 return true; |
21 } | 22 } |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // The notification sent while a modal dialog was present was silently | 123 // The notification sent while a modal dialog was present was silently |
123 // dropped. | 124 // dropped. |
124 ASSERT_EQ(0, callback_count); | 125 ASSERT_EQ(0, callback_count); |
125 | 126 |
126 // But now that the active modal dialog is NULL notifications will be handled. | 127 // But now that the active modal dialog is NULL notifications will be handled. |
127 result = ps2.NotifyOtherProcessOrCreate(); | 128 result = ps2.NotifyOtherProcessOrCreate(); |
128 ASSERT_EQ(ProcessSingleton::PROCESS_NOTIFIED, result); | 129 ASSERT_EQ(ProcessSingleton::PROCESS_NOTIFIED, result); |
129 ASSERT_EQ(1, callback_count); | 130 ASSERT_EQ(1, callback_count); |
130 } | 131 } |
131 #endif // defined(OS_WIN) && !defined(USE_AURA) | 132 #endif // defined(OS_WIN) && !defined(USE_AURA) |
OLD | NEW |