OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Main function for common unittests. | 5 // Main function for common unittests. |
6 #include <atlbase.h> | 6 #include <atlbase.h> |
7 #include <atlcom.h> | 7 #include <atlcom.h> |
8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 LONG LockModule() { | 21 LONG LockModule() { |
22 return 0; | 22 return 0; |
23 } | 23 } |
24 LONG UnlockModule() { | 24 LONG UnlockModule() { |
25 return 0; | 25 return 0; |
26 } | 26 } |
27 void Lock() { | 27 void Lock() { |
28 } | 28 } |
29 void Unlock() { | 29 void Unlock() { |
30 } | 30 } |
31 void AddRefModuleWorkerThread() { | 31 void AddRefBroker() { |
32 } | 32 } |
33 void ReleaseModuleWorkerThread() { | 33 void ReleaseBroker() { |
34 } | 34 } |
35 | 35 |
36 // Fires an event to the broker, so that the call can be made with an | 36 // Fires an event to the broker, so that the call can be made with an |
37 // instance of a broker proxy that was CoCreated in the worker thread. | 37 // instance of a broker proxy that was CoCreated in the worker thread. |
38 void FireEventToBroker(const std::string& event_name, | 38 void FireEventToBroker(const std::string& event_name, |
39 const std::string& event_args) { | 39 const std::string& event_args) { |
40 // Must get some work done so that the function can be mocked. | 40 // Must get some work done so that the function can be mocked. |
41 // Otherwise, it would be too short to be side stepped... | 41 // Otherwise, it would be too short to be side stepped... |
42 if (event_name == event_args) { | 42 if (event_name == event_args) { |
43 CHECK(event_name == event_args); | 43 CHECK(event_name == event_args); |
(...skipping 24 matching lines...) Expand all Loading... |
68 base::AtExitManager at_exit; | 68 base::AtExitManager at_exit; |
69 CommandLine::Init(argc, argv); | 69 CommandLine::Init(argc, argv); |
70 | 70 |
71 // Needs to be called before we can use GURL. | 71 // Needs to be called before we can use GURL. |
72 chrome::RegisterChromeSchemes(); | 72 chrome::RegisterChromeSchemes(); |
73 | 73 |
74 testing::InitGoogleMock(&argc, argv); | 74 testing::InitGoogleMock(&argc, argv); |
75 testing::InitGoogleTest(&argc, argv); | 75 testing::InitGoogleTest(&argc, argv); |
76 return RUN_ALL_TESTS(); | 76 return RUN_ALL_TESTS(); |
77 } | 77 } |
OLD | NEW |