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

Unified Diff: content/common/gpu/gpu_channel_unittest.cc

Issue 1711533002: Decouple browser-specific GPU IPC messages from GPU service IPCs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restored if guards on GpuChannelManager Created 4 years, 10 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 | « content/common/gpu/gpu_channel_test_common.cc ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_channel_unittest.cc
diff --git a/content/common/gpu/gpu_channel_unittest.cc b/content/common/gpu/gpu_channel_unittest.cc
index cecd765fd70ebd603f2c6086378961be541b3bbb..2b0ba2c12886a1694e3973c7ff9ed0f88a562085 100644
--- a/content/common/gpu/gpu_channel_unittest.cc
+++ b/content/common/gpu/gpu_channel_unittest.cc
@@ -5,6 +5,7 @@
#include <stdint.h>
#include "base/test/test_simple_task_runner.h"
+#include "content/common/gpu/establish_channel_params.h"
#include "content/common/gpu/gpu_channel.h"
#include "content/common/gpu/gpu_channel_manager.h"
#include "content/common/gpu/gpu_channel_test_common.h"
@@ -23,23 +24,22 @@ class GpuChannelTest : public GpuChannelTestCommon {
bool allow_real_time_streams) {
DCHECK(channel_manager());
uint64_t kClientTracingId = 1;
- GpuMsg_EstablishChannel_Params params;
+ EstablishChannelParams params;
params.client_id = client_id;
params.client_tracing_id = kClientTracingId;
params.preempts = false;
params.allow_view_command_buffers = allow_view_command_buffers;
params.allow_real_time_streams = allow_real_time_streams;
- EXPECT_TRUE(
- channel_manager()->OnMessageReceived(GpuMsg_EstablishChannel(params)));
- sink()->ClearMessages();
+ channel_manager()->EstablishChannel(params);
return channel_manager()->LookupChannel(client_id);
}
void HandleMessage(GpuChannel* channel, IPC::Message* msg) {
- channel->HandleMessageForTesting(*msg);
+ TestGpuChannel* test_channel = static_cast<TestGpuChannel*>(channel);
+ test_channel->HandleMessageForTesting(*msg);
if (msg->is_sync()) {
- const IPC::Message* reply_msg = sink()->GetMessageAt(0);
+ const IPC::Message* reply_msg = test_channel->sink()->GetMessageAt(0);
ASSERT_TRUE(reply_msg);
EXPECT_TRUE(IPC::SyncMessage::IsMessageReplyTo(
@@ -52,7 +52,7 @@ class GpuChannelTest : public GpuChannelTestCommon {
delete deserializer;
- sink()->ClearMessages();
+ test_channel->sink()->ClearMessages();
}
delete msg;
« no previous file with comments | « content/common/gpu/gpu_channel_test_common.cc ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698