Index: webkit/compositor_bindings/web_layer_tree_view_unittest.cc |
diff --git a/webkit/compositor_bindings/web_layer_tree_view_unittest.cc b/webkit/compositor_bindings/web_layer_tree_view_unittest.cc |
index 3d40bdef989a184a19c9467b703a9cc2e77aa8b8..06b649915fe7c725bc3b51ddbb66f9d1ad130d23 100644 |
--- a/webkit/compositor_bindings/web_layer_tree_view_unittest.cc |
+++ b/webkit/compositor_bindings/web_layer_tree_view_unittest.cc |
@@ -46,7 +46,12 @@ public: |
initializeCompositor(); |
m_rootLayer.reset(new WebLayerImpl); |
m_view.reset(new WebLayerTreeViewImpl(client())); |
- ASSERT_TRUE(m_view->initialize(WebLayerTreeView::Settings())); |
+ scoped_ptr<cc::Thread> implCCThread(NULL); |
+ if (m_implThread) |
+ implCCThread = cc::ThreadImpl::createForDifferentThread( |
+ m_implThread->message_loop_proxy()); |
+ ASSERT_TRUE(m_view->initialize(WebLayerTreeView::Settings(), |
+ implCCThread.Pass())); |
m_view->setRootLayer(*m_rootLayer); |
m_view->setSurfaceReady(); |
} |
@@ -62,6 +67,7 @@ public: |
protected: |
scoped_ptr<WebLayer> m_rootLayer; |
scoped_ptr<WebLayerTreeViewImpl> m_view; |
+ scoped_ptr<base::Thread> m_implThread; |
}; |
class WebLayerTreeViewSingleThreadTest : public WebLayerTreeViewTestBase { |
@@ -87,7 +93,6 @@ class WebLayerTreeViewThreadedTest : public WebLayerTreeViewTestBase { |
protected: |
virtual ~WebLayerTreeViewThreadedTest() |
{ |
- cc::Proxy::setImplThread(0); |
} |
void composite() |
@@ -105,8 +110,6 @@ protected: |
{ |
m_implThread.reset(new base::Thread("ThreadedTest")); |
ASSERT_TRUE(m_implThread->Start()); |
- m_implCCThread = cc::ThreadImpl::createForDifferentThread(m_implThread->message_loop_proxy()); |
- cc::Proxy::setImplThread(m_implCCThread.get()); |
} |
virtual WebLayerTreeViewClient* client() OVERRIDE |
@@ -115,8 +118,6 @@ protected: |
} |
MockWebLayerTreeViewClientForThreadedTests m_client; |
- scoped_ptr<base::Thread> m_implThread; |
- scoped_ptr<cc::Thread> m_implCCThread; |
base::CancelableClosure m_timeout; |
}; |