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

Side by Side Diff: chrome/common/service_process_util_unittest.cc

Issue 12226045: Linux/ChromeOS Chromium style checker cleanup, chrome/ edition part 1. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
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/file_path.h" 10 #include "base/file_path.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 std::string scoped_name = GetServiceProcessScopedVersionedName(test_str); 61 std::string scoped_name = GetServiceProcessScopedVersionedName(test_str);
62 chrome::VersionInfo version_info; 62 chrome::VersionInfo version_info;
63 DCHECK(version_info.is_valid()); 63 DCHECK(version_info.is_valid());
64 EXPECT_TRUE(EndsWith(scoped_name, test_str, true)); 64 EXPECT_TRUE(EndsWith(scoped_name, test_str, true));
65 EXPECT_NE(std::string::npos, scoped_name.find(version_info.Version())); 65 EXPECT_NE(std::string::npos, scoped_name.find(version_info.Version()));
66 } 66 }
67 67
68 class ServiceProcessStateTest : public base::MultiProcessTest { 68 class ServiceProcessStateTest : public base::MultiProcessTest {
69 public: 69 public:
70 ServiceProcessStateTest(); 70 ServiceProcessStateTest();
71 ~ServiceProcessStateTest(); 71 virtual ~ServiceProcessStateTest();
72 virtual void SetUp(); 72 virtual void SetUp();
73 base::MessageLoopProxy* IOMessageLoopProxy() { 73 base::MessageLoopProxy* IOMessageLoopProxy() {
74 return io_thread_.message_loop_proxy(); 74 return io_thread_.message_loop_proxy();
75 } 75 }
76 void LaunchAndWait(const std::string& name); 76 void LaunchAndWait(const std::string& name);
77 77
78 private: 78 private:
79 // This is used to release the ServiceProcessState singleton after each test. 79 // This is used to release the ServiceProcessState singleton after each test.
80 base::ShadowingAtExitManager at_exit_manager_; 80 base::ShadowingAtExitManager at_exit_manager_;
81 base::Thread io_thread_; 81 base::Thread io_thread_;
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 ScopedAttributesRestorer restorer(bundle_path(), 0777); 409 ScopedAttributesRestorer restorer(bundle_path(), 0777);
410 GetIOMessageLoopProxy()->PostTask( 410 GetIOMessageLoopProxy()->PostTask(
411 FROM_HERE, 411 FROM_HERE,
412 base::Bind(&ChangeAttr, bundle_path(), 0222)); 412 base::Bind(&ChangeAttr, bundle_path(), 0222));
413 Run(); 413 Run();
414 ASSERT_TRUE(mock_launchd()->remove_called()); 414 ASSERT_TRUE(mock_launchd()->remove_called());
415 ASSERT_TRUE(mock_launchd()->delete_called()); 415 ASSERT_TRUE(mock_launchd()->delete_called());
416 } 416 }
417 417
418 #endif // !OS_MACOSX 418 #endif // !OS_MACOSX
OLDNEW
« no previous file with comments | « chrome/common/multi_process_lock_linux.cc ('k') | chrome/common/worker_thread_ticker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698