| 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/common/service_process_util.h" | 5 #include "chrome/common/service_process_util.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 EXPECT_FALSE(g_good_shutdown); | 237 EXPECT_FALSE(g_good_shutdown); |
| 238 message_loop.Run(); | 238 message_loop.Run(); |
| 239 EXPECT_TRUE(g_good_shutdown); | 239 EXPECT_TRUE(g_good_shutdown); |
| 240 return 0; | 240 return 0; |
| 241 } | 241 } |
| 242 | 242 |
| 243 #else // !OS_MACOSX | 243 #else // !OS_MACOSX |
| 244 | 244 |
| 245 #include <CoreFoundation/CoreFoundation.h> | 245 #include <CoreFoundation/CoreFoundation.h> |
| 246 | 246 |
| 247 #include "base/file_util.h" | |
| 248 #include "base/files/file_path.h" | 247 #include "base/files/file_path.h" |
| 248 #include "base/files/file_util.h" |
| 249 #include "base/files/scoped_temp_dir.h" | 249 #include "base/files/scoped_temp_dir.h" |
| 250 #include "base/mac/mac_util.h" | 250 #include "base/mac/mac_util.h" |
| 251 #include "base/test/test_timeouts.h" | 251 #include "base/test/test_timeouts.h" |
| 252 #include "base/threading/thread.h" | 252 #include "base/threading/thread.h" |
| 253 #include "chrome/common/mac/launchd.h" | 253 #include "chrome/common/mac/launchd.h" |
| 254 #include "chrome/common/mac/mock_launchd.h" | 254 #include "chrome/common/mac/mock_launchd.h" |
| 255 #include "testing/gtest/include/gtest/gtest.h" | 255 #include "testing/gtest/include/gtest/gtest.h" |
| 256 | 256 |
| 257 class ServiceProcessStateFileManipulationTest : public ::testing::Test { | 257 class ServiceProcessStateFileManipulationTest : public ::testing::Test { |
| 258 protected: | 258 protected: |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 ScopedAttributesRestorer restorer(bundle_path(), 0777); | 413 ScopedAttributesRestorer restorer(bundle_path(), 0777); |
| 414 GetIOMessageLoopProxy()->PostTask( | 414 GetIOMessageLoopProxy()->PostTask( |
| 415 FROM_HERE, | 415 FROM_HERE, |
| 416 base::Bind(&ChangeAttr, bundle_path(), 0222)); | 416 base::Bind(&ChangeAttr, bundle_path(), 0222)); |
| 417 Run(); | 417 Run(); |
| 418 ASSERT_TRUE(mock_launchd()->remove_called()); | 418 ASSERT_TRUE(mock_launchd()->remove_called()); |
| 419 ASSERT_TRUE(mock_launchd()->delete_called()); | 419 ASSERT_TRUE(mock_launchd()->delete_called()); |
| 420 } | 420 } |
| 421 | 421 |
| 422 #endif // !OS_MACOSX | 422 #endif // !OS_MACOSX |
| OLD | NEW |