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() { | |
32 } | |
33 void ReleaseModuleWorkerThread() { | |
34 } | |
35 | |
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. | |
38 void FireEventToBroker(const std::string& event_name, | |
39 const std::string& event_args) { | |
40 // Must get some work done so that the function can be mocked. | |
41 // Otherwise, it would be too short to be side stepped... | |
42 if (event_name == event_args) { | |
43 CHECK(event_name == event_args); | |
44 } else { | |
45 CHECK(event_name != event_args); | |
46 } | |
47 } | |
48 | 31 |
49 } // namespace ceee_module_util | 32 } // namespace ceee_module_util |
50 | 33 |
51 | 34 |
52 // We're testing ATL code that requires a module object. | 35 // We're testing ATL code that requires a module object. |
53 class ObligatoryModule: public CAtlDllModuleT<ObligatoryModule> { | 36 class ObligatoryModule: public CAtlDllModuleT<ObligatoryModule> { |
54 public: | 37 public: |
55 DECLARE_LIBID(LIBID_ToolbandLib); | 38 DECLARE_LIBID(LIBID_ToolbandLib); |
56 }; | 39 }; |
57 | 40 |
(...skipping 10 matching lines...) Expand all Loading... |
68 base::AtExitManager at_exit; | 51 base::AtExitManager at_exit; |
69 CommandLine::Init(argc, argv); | 52 CommandLine::Init(argc, argv); |
70 | 53 |
71 // Needs to be called before we can use GURL. | 54 // Needs to be called before we can use GURL. |
72 chrome::RegisterChromeSchemes(); | 55 chrome::RegisterChromeSchemes(); |
73 | 56 |
74 testing::InitGoogleMock(&argc, argv); | 57 testing::InitGoogleMock(&argc, argv); |
75 testing::InitGoogleTest(&argc, argv); | 58 testing::InitGoogleTest(&argc, argv); |
76 return RUN_ALL_TESTS(); | 59 return RUN_ALL_TESTS(); |
77 } | 60 } |
OLD | NEW |