| 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 #include "base/sys_info.h" | 5 #include "base/sys_info.h" |
| 6 #include "base/string_util.h" | 6 #include "base/string_util.h" |
| 7 #include "chrome/renderer/render_process_impl.h" | 7 #include "chrome/renderer/render_process_impl.h" |
| 8 #include "gfx/rect.h" | |
| 9 #include "ipc/ipc_channel.h" | 8 #include "ipc/ipc_channel.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "ui/gfx/rect.h" |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 static const char kThreadName[] = "render_process_unittest"; | 14 static const char kThreadName[] = "render_process_unittest"; |
| 15 | 15 |
| 16 class RenderProcessTest : public testing::Test { | 16 class RenderProcessTest : public testing::Test { |
| 17 public: | 17 public: |
| 18 virtual void SetUp() { | 18 virtual void SetUp() { |
| 19 // Need a MODE_SERVER to make MODE_CLIENTs (like a RenderThread) happy. | 19 // Need a MODE_SERVER to make MODE_CLIENTs (like a RenderThread) happy. |
| 20 channel_ = new IPC::Channel(kThreadName, IPC::Channel::MODE_SERVER, NULL); | 20 channel_ = new IPC::Channel(kThreadName, IPC::Channel::MODE_SERVER, NULL); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 48 skia::PlatformCanvas* canvas = | 48 skia::PlatformCanvas* canvas = |
| 49 RenderProcess::current()->GetDrawingCanvas(&dib, rect); | 49 RenderProcess::current()->GetDrawingCanvas(&dib, rect); |
| 50 ASSERT_TRUE(dib); | 50 ASSERT_TRUE(dib); |
| 51 ASSERT_TRUE(canvas); | 51 ASSERT_TRUE(canvas); |
| 52 RenderProcess::current()->ReleaseTransportDIB(dib); | 52 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 53 delete canvas; | 53 delete canvas; |
| 54 #endif | 54 #endif |
| 55 } | 55 } |
| 56 | 56 |
| 57 } // namespace | 57 } // namespace |
| OLD | NEW |