diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-19 05:25:05 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-19 05:25:05 +0000 |
commit | 501a770c98cce5fadde5f11d950083ab2afe16f3 (patch) | |
tree | 7233db544adee4441b683f0e18210076a85da33a /cc/resource_provider_unittest.cc | |
parent | c5e479f2ea076dbcf1826c83875c9dcf171eee15 (diff) | |
download | chromium_src-501a770c98cce5fadde5f11d950083ab2afe16f3.zip chromium_src-501a770c98cce5fadde5f11d950083ab2afe16f3.tar.gz chromium_src-501a770c98cce5fadde5f11d950083ab2afe16f3.tar.bz2 |
cc: Cleaning up LayerTreeHost tests.
While writing unit tests for lost contents I got fed up with the crazy
entangled mess that is layer_tree_host_unittests. It's long overdue we
clean this file up to improve code reuse, and split it apart.
- Removes the CompositorFakeWebGraphicsContext3D
- Removes the CompositorFakeWebGraphicsContext3DWithTextureTracking
- Use FakeWebGraphicsContext3D in place of the above two classes.
- Move a single animation unit test to layer_tree_host_unittest_animation. This
is to demonstrate how I intend to split up the file. I'll move all the animation
related tests to _animation.cc, and group others by their kinds.
Added a setupTree() method to the base class for LayerTreeHostTests that allows
for easily constructing a base class test case that multiple tests can be constructed
around without copy-pasta.
R=enne,jamesr
Review URL: https://codereview.chromium.org/11643003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173860 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resource_provider_unittest.cc')
-rw-r--r-- | cc/resource_provider_unittest.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cc/resource_provider_unittest.cc b/cc/resource_provider_unittest.cc index aee55ba..0a737e5 100644 --- a/cc/resource_provider_unittest.cc +++ b/cc/resource_provider_unittest.cc @@ -8,8 +8,8 @@ #include "cc/output_surface.h" #include "cc/scoped_ptr_deque.h" #include "cc/scoped_ptr_hash_map.h" -#include "cc/test/compositor_fake_web_graphics_context_3d.h" #include "cc/test/fake_output_surface.h" +#include "cc/test/fake_web_graphics_context_3d.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h" @@ -96,7 +96,7 @@ private: base::hash_map<unsigned, unsigned> m_syncPointForMailbox; }; -class ResourceProviderContext : public CompositorFakeWebGraphicsContext3D { +class ResourceProviderContext : public FakeWebGraphicsContext3D { public: static scoped_ptr<ResourceProviderContext> create(ContextSharedData* sharedData) { return make_scoped_ptr(new ResourceProviderContext(Attributes(), sharedData)); } @@ -125,7 +125,7 @@ public: virtual WebGLId createTexture() { - WebGLId id = CompositorFakeWebGraphicsContext3D::createTexture(); + WebGLId id = FakeWebGraphicsContext3D::createTexture(); m_textures.add(id, scoped_ptr<Texture>()); return id; } @@ -223,7 +223,7 @@ public: protected: ResourceProviderContext(const Attributes& attrs, ContextSharedData* sharedData) - : CompositorFakeWebGraphicsContext3D(attrs) + : FakeWebGraphicsContext3D(attrs) , m_sharedData(sharedData) , m_currentTexture(0) , m_lastWaitedSyncPoint(0) |