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

Unified Diff: chrome/renderer/mock_render_process.h

Issue 16482: Refactor the render widget unittest so it can be reused to create a render vi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/ipc_message_utils.h ('k') | chrome/renderer/mock_render_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/mock_render_process.h
===================================================================
--- chrome/renderer/mock_render_process.h (revision 0)
+++ chrome/renderer/mock_render_process.h (revision 0)
@@ -0,0 +1,25 @@
+// Copyright (c) 2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_RENDERER_MOCK_RENDER_PROCESS_H_
+#define CHROME_RENDERER_MOCK_RENDER_PROCESS_H_
+
+#include <string>
+
+#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(const std::wstring& channel_name) {}
+ static void GlobalInit() {
+ ChildProcessFactory<MockProcess> factory;
+ ChildProcess::GlobalInit(L"dummy", &factory);
+ }
+};
+
+#endif // CHROME_RENDERER_MOCK_RENDER_PROCESS_H_
+
Property changes on: chrome\renderer\mock_render_process.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/common/ipc_message_utils.h ('k') | chrome/renderer/mock_render_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698