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

Unified Diff: cc/layers/delegated_frame_resource_collection_unittest.cc

Issue 485043003: cc: Use correct message loop proxy in BlockingTaskRunner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits. Created 6 years, 3 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 | « cc/layers/delegated_frame_resource_collection.cc ('k') | cc/layers/delegated_renderer_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/delegated_frame_resource_collection_unittest.cc
diff --git a/cc/layers/delegated_frame_resource_collection_unittest.cc b/cc/layers/delegated_frame_resource_collection_unittest.cc
index 9f131dfbf4375b029e4347b372ab2546ae7473b7..9bfd59ce201c67225272f66e1d7359f9d9ce6521 100644
--- a/cc/layers/delegated_frame_resource_collection_unittest.cc
+++ b/cc/layers/delegated_frame_resource_collection_unittest.cc
@@ -9,6 +9,7 @@
#include "cc/layers/delegated_frame_resource_collection.h"
#include "cc/resources/returned_resource.h"
#include "cc/resources/transferable_resource.h"
+#include "cc/trees/blocking_task_runner.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace cc {
@@ -80,8 +81,9 @@ TEST_F(DelegatedFrameResourceCollectionTest, NoRef) {
void ReturnResourcesOnThread(ReturnCallback callback,
const ReturnedResourceArray& resources,
- base::WaitableEvent* event) {
- callback.Run(resources);
+ base::WaitableEvent* event,
+ BlockingTaskRunner* main_thread_task_runner) {
+ callback.Run(resources, main_thread_task_runner);
if (event)
event->Wait();
}
@@ -92,6 +94,8 @@ void ReturnResourcesOnThread(ReturnCallback callback,
TEST_F(DelegatedFrameResourceCollectionTest, Thread) {
base::Thread thread("test thread");
thread.Start();
+ scoped_ptr<BlockingTaskRunner> main_thread_task_runner(
+ BlockingTaskRunner::Create(base::MessageLoopProxy::current()));
TransferableResourceArray resources = CreateResourceArray();
resource_collection_->ReceivedResources(resources);
@@ -112,7 +116,8 @@ TEST_F(DelegatedFrameResourceCollectionTest, Thread) {
&ReturnResourcesOnThread,
resource_collection_->GetReturnResourcesCallbackForImplThread(),
returned_resources,
- &event));
+ &event,
+ main_thread_task_runner.get()));
run_loop.Run();
}
@@ -151,7 +156,8 @@ TEST_F(DelegatedFrameResourceCollectionTest, Thread) {
base::Bind(&ReturnResourcesOnThread,
return_callback,
returned_resources,
- null_event));
+ null_event,
+ main_thread_task_runner.get()));
thread.Stop();
}
« no previous file with comments | « cc/layers/delegated_frame_resource_collection.cc ('k') | cc/layers/delegated_renderer_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698