summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/mock_render_process.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/renderer/mock_render_process.h')
-rw-r--r--chrome/renderer/mock_render_process.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome/renderer/mock_render_process.h b/chrome/renderer/mock_render_process.h
index 629967f..d7bd178 100644
--- a/chrome/renderer/mock_render_process.h
+++ b/chrome/renderer/mock_render_process.h
@@ -5,17 +5,21 @@
#ifndef CHROME_RENDERER_MOCK_RENDER_PROCESS_H_
#define CHROME_RENDERER_MOCK_RENDER_PROCESS_H_
-#include "chrome/common/child_process.h"
+#include <string>
-class ChildThread;
+#include "chrome/common/child_process.h"
// This class is a trivial mock of the child process singleton. It is necessary
// so we don't trip DCHECKs in ChildProcess::ReleaseProcess() when destroying
// a render widget instance.
class MockProcess : public ChildProcess {
public:
- explicit MockProcess() : ChildProcess(NULL) {}
- explicit MockProcess(ChildThread* thread) : ChildProcess(thread) {}
+ explicit MockProcess(const std::wstring& channel_name) {}
+ static void GlobalInit() {
+ ChildProcessFactory<MockProcess> factory;
+ ChildProcess::GlobalInit(L"dummy", &factory);
+ }
};
#endif // CHROME_RENDERER_MOCK_RENDER_PROCESS_H_
+