OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ppapi/proxy/ppapi_proxy_test.h" | 5 #include "ppapi/proxy/ppapi_proxy_test.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 bool unused_result = false; | 131 bool unused_result = false; |
132 PpapiMsg_SupportsInterface msg(name, &unused_result); | 132 PpapiMsg_SupportsInterface msg(name, &unused_result); |
133 GetDispatcher()->OnMessageReceived(msg); | 133 GetDispatcher()->OnMessageReceived(msg); |
134 | 134 |
135 const IPC::Message* reply_msg = | 135 const IPC::Message* reply_msg = |
136 sink().GetUniqueMessageMatching(IPC_REPLY_ID); | 136 sink().GetUniqueMessageMatching(IPC_REPLY_ID); |
137 EXPECT_TRUE(reply_msg); | 137 EXPECT_TRUE(reply_msg); |
138 if (!reply_msg) | 138 if (!reply_msg) |
139 return false; | 139 return false; |
140 | 140 |
141 base::TupleTypes<PpapiMsg_SupportsInterface::ReplyParam>::ValueTuple | 141 PpapiMsg_SupportsInterface::ReplyParam reply_data; |
142 reply_data; | |
143 EXPECT_TRUE(PpapiMsg_SupportsInterface::ReadReplyParam( | 142 EXPECT_TRUE(PpapiMsg_SupportsInterface::ReadReplyParam( |
144 reply_msg, &reply_data)); | 143 reply_msg, &reply_data)); |
145 | 144 |
146 sink().ClearMessages(); | 145 sink().ClearMessages(); |
147 return base::get<0>(reply_data); | 146 return base::get<0>(reply_data); |
148 } | 147 } |
149 | 148 |
150 // PluginProxyTestHarness ------------------------------------------------------ | 149 // PluginProxyTestHarness ------------------------------------------------------ |
151 | 150 |
152 PluginProxyTestHarness::PluginProxyTestHarness( | 151 PluginProxyTestHarness::PluginProxyTestHarness( |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 void TwoWayTest::PostTaskOnRemoteHarness(const base::Closure& task) { | 580 void TwoWayTest::PostTaskOnRemoteHarness(const base::Closure& task) { |
582 base::WaitableEvent task_complete(true, false); | 581 base::WaitableEvent task_complete(true, false); |
583 plugin_thread_.task_runner()->PostTask( | 582 plugin_thread_.task_runner()->PostTask( |
584 FROM_HERE, base::Bind(&RunTaskOnRemoteHarness, task, &task_complete)); | 583 FROM_HERE, base::Bind(&RunTaskOnRemoteHarness, task, &task_complete)); |
585 task_complete.Wait(); | 584 task_complete.Wait(); |
586 } | 585 } |
587 | 586 |
588 | 587 |
589 } // namespace proxy | 588 } // namespace proxy |
590 } // namespace ppapi | 589 } // namespace ppapi |
OLD | NEW |