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

Unified Diff: chrome/renderer/render_process_unittest.cc

Issue 6864001: Move RenderProcess to content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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/renderer/render_process_impl.cc ('k') | chrome/renderer/renderer_glue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_process_unittest.cc
===================================================================
--- chrome/renderer/render_process_unittest.cc (revision 81674)
+++ chrome/renderer/render_process_unittest.cc (working copy)
@@ -1,57 +0,0 @@
-// Copyright (c) 2010 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.
-
-#include "base/sys_info.h"
-#include "base/string_util.h"
-#include "chrome/renderer/render_process_impl.h"
-#include "ipc/ipc_channel.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/gfx/rect.h"
-
-namespace {
-
-static const char kThreadName[] = "render_process_unittest";
-
-class RenderProcessTest : public testing::Test {
- public:
- virtual void SetUp() {
- // Need a MODE_SERVER to make MODE_CLIENTs (like a RenderThread) happy.
- channel_ = new IPC::Channel(kThreadName, IPC::Channel::MODE_SERVER, NULL);
- render_process_.reset(new RenderProcessImpl);
- }
-
- virtual void TearDown() {
- message_loop_.RunAllPending();
- render_process_.reset();
- // Need to fully destruct IPC::SyncChannel before the message loop goes
- // away.
- message_loop_.RunAllPending();
- // Delete the server channel after the RenderThread so that
- // IPC::SyncChannel's OnChannelError doesn't fire on the context and attempt
- // to use the listener thread which is now gone.
- delete channel_;
- }
-
- private:
- MessageLoopForIO message_loop_;
- scoped_ptr<RenderProcessImpl> render_process_;
- IPC::Channel *channel_;
-};
-
-
-TEST_F(RenderProcessTest, TestTransportDIBAllocation) {
- // On Mac, we allocate in the browser so this test is invalid.
-#if !defined(OS_MACOSX)
- const gfx::Rect rect(0, 0, 100, 100);
- TransportDIB* dib;
- skia::PlatformCanvas* canvas =
- RenderProcess::current()->GetDrawingCanvas(&dib, rect);
- ASSERT_TRUE(dib);
- ASSERT_TRUE(canvas);
- RenderProcess::current()->ReleaseTransportDIB(dib);
- delete canvas;
-#endif
-}
-
-} // namespace
« no previous file with comments | « chrome/renderer/render_process_impl.cc ('k') | chrome/renderer/renderer_glue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698