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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 | 313 |
314 secondary_thread_.reset(new base::DelegateSimpleThread( | 314 secondary_thread_.reset(new base::DelegateSimpleThread( |
315 this, "PluginProxyMultiThreadTest")); | 315 this, "PluginProxyMultiThreadTest")); |
316 | 316 |
317 { | 317 { |
318 ProxyAutoLock auto_lock; | 318 ProxyAutoLock auto_lock; |
319 | 319 |
320 // MessageLoopResource assumes that the proxy lock has been acquired. | 320 // MessageLoopResource assumes that the proxy lock has been acquired. |
321 secondary_thread_message_loop_ = new MessageLoopResource(pp_instance()); | 321 secondary_thread_message_loop_ = new MessageLoopResource(pp_instance()); |
322 | 322 |
323 // TODO(yzshen): The comment of PPB_MessageLoop says that it would return | |
324 // PP_OK_COMPLETIONPENDING. Either fix the comment or the implementation. | |
325 ASSERT_EQ(PP_OK, | 323 ASSERT_EQ(PP_OK, |
326 secondary_thread_message_loop_->PostWork( | 324 secondary_thread_message_loop_->PostWork( |
327 PP_MakeCompletionCallback( | 325 PP_MakeCompletionCallback( |
328 &PluginProxyMultiThreadTest::InternalSetUpTestOnSecondaryThread, | 326 &PluginProxyMultiThreadTest::InternalSetUpTestOnSecondaryThread, |
329 this), | 327 this), |
330 0)); | 328 0)); |
331 } | 329 } |
332 | 330 |
333 SetUpTestOnMainThread(); | 331 SetUpTestOnMainThread(); |
334 | 332 |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 plugin_thread_.message_loop_proxy()->PostTask(FROM_HERE, | 572 plugin_thread_.message_loop_proxy()->PostTask(FROM_HERE, |
575 base::Bind(&RunTaskOnRemoteHarness, | 573 base::Bind(&RunTaskOnRemoteHarness, |
576 task, | 574 task, |
577 &task_complete)); | 575 &task_complete)); |
578 task_complete.Wait(); | 576 task_complete.Wait(); |
579 } | 577 } |
580 | 578 |
581 | 579 |
582 } // namespace proxy | 580 } // namespace proxy |
583 } // namespace ppapi | 581 } // namespace ppapi |
OLD | NEW |