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

Unified Diff: cc/texture_layer_unittest.cc

Issue 11369071: A speculative Revert for r165872 - Remove static thread pointers from CC, attempt 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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/test/run_all_unittests.cc ('k') | cc/thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/texture_layer_unittest.cc
===================================================================
--- cc/texture_layer_unittest.cc (revision 165906)
+++ cc/texture_layer_unittest.cc (working copy)
@@ -10,7 +10,6 @@
#include "cc/single_thread_proxy.h"
#include "cc/texture_layer_impl.h"
#include "cc/test/fake_layer_tree_host_client.h"
-#include "cc/thread.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -27,7 +26,7 @@
MockLayerImplTreeHost()
: LayerTreeHost(&m_fakeClient, LayerTreeSettings())
{
- initialize(scoped_ptr<Thread>(NULL));
+ initialize();
}
MOCK_METHOD0(acquireLayerTextures, void());
@@ -98,7 +97,10 @@
scoped_refptr<TextureLayer> testLayer = TextureLayer::create(0);
ASSERT_TRUE(testLayer);
scoped_ptr<TextureLayerImpl> implLayer;
- implLayer = TextureLayerImpl::create(1);
+ {
+ DebugScopedSetImplThread setImplThread;
+ implLayer = TextureLayerImpl::create(1);
+ }
ASSERT_TRUE(implLayer);
EXPECT_CALL(*m_layerTreeHost, acquireLayerTextures()).Times(AnyNumber());
@@ -142,6 +144,11 @@
testLayer->willModifyTexture();
testLayer->setNeedsDisplayRect(dirtyRect);
Mock::VerifyAndClearExpectations(m_layerTreeHost.get());
+
+ {
+ DebugScopedSetImplThread setImplThread;
+ delete implLayer.release();
+ }
}
TEST_F(TextureLayerTest, syncImplWhenRemovingFromTree)
« no previous file with comments | « cc/test/run_all_unittests.cc ('k') | cc/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698