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

Unified Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 14925009: Run all LayerTreeHost tests with a delegating renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
Index: cc/trees/layer_tree_host_unittest_context.cc
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index 1c3da6120382c940a80e1fc96f01d9b3640fb761..c99d5aad96d443dfc56f69e30f48af836d3aceb0 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -479,27 +479,51 @@ class LayerTreeHostContextTestLostContextSucceedsWithContent
};
TEST_F(LayerTreeHostContextTestLostContextSucceedsWithContent,
- NoSurface_SingleThread) {
+ NoSurface_SingleThread_DirectRenderer) {
use_surface_ = false;
- RunTest(false);
+ RunTest(false, false);
}
TEST_F(LayerTreeHostContextTestLostContextSucceedsWithContent,
- NoSurface_MultiThread) {
+ NoSurface_SingleThread_DelegatingRenderer) {
use_surface_ = false;
- RunTest(true);
+ RunTest(false, true);
}
TEST_F(LayerTreeHostContextTestLostContextSucceedsWithContent,
- WithSurface_SingleThread) {
+ NoSurface_MultiThread_DirectRenderer) {
+ use_surface_ = false;
+ RunTest(true, false);
+}
+
+TEST_F(LayerTreeHostContextTestLostContextSucceedsWithContent,
+ NoSurface_MultiThread_DelegatingRenderer) {
+ use_surface_ = false;
+ RunTest(true, true);
+}
+
+TEST_F(LayerTreeHostContextTestLostContextSucceedsWithContent,
+ WithSurface_SingleThread_DirectRenderer) {
use_surface_ = true;
- RunTest(false);
+ RunTest(false, false);
}
TEST_F(LayerTreeHostContextTestLostContextSucceedsWithContent,
- WithSurface_MultiThread) {
+ WithSurface_SingleThread_DelegatingRenderer) {
use_surface_ = true;
- RunTest(true);
+ RunTest(false, true);
+}
+
+TEST_F(LayerTreeHostContextTestLostContextSucceedsWithContent,
+ WithSurface_MultiThread_DirectRenderer) {
+ use_surface_ = true;
+ RunTest(true, false);
+}
+
+TEST_F(LayerTreeHostContextTestLostContextSucceedsWithContent,
+ WithSurface_MultiThread_DelegatingRenderer) {
+ use_surface_ = true;
+ RunTest(true, true);
}
class LayerTreeHostContextTestOffscreenContextFails
@@ -602,51 +626,99 @@ class LayerTreeHostContextTestLostContextFails
};
TEST_F(LayerTreeHostContextTestLostContextFails,
- FailReinitialize100_SingleThread) {
+ FailReinitialize100_SingleThread_DirectRenderer) {
+ times_to_fail_reinitialize_ = 100;
+ times_to_fail_recreate_ = 0;
+ times_to_lose_on_recreate_ = 0;
+ RunTest(false, false);
+}
+
+TEST_F(LayerTreeHostContextTestLostContextFails,
+ FailReinitialize100_SingleThread_DelegatingRenderer) {
times_to_fail_reinitialize_ = 100;
times_to_fail_recreate_ = 0;
times_to_lose_on_recreate_ = 0;
- RunTest(false);
+ RunTest(false, true);
}
TEST_F(LayerTreeHostContextTestLostContextFails,
- FailReinitialize100_MultiThread) {
+ FailReinitialize100_MultiThread_DirectRenderer) {
times_to_fail_reinitialize_ = 100;
times_to_fail_recreate_ = 0;
times_to_lose_on_recreate_ = 0;
- RunTest(true);
+ RunTest(true, false);
+}
+
+TEST_F(LayerTreeHostContextTestLostContextFails,
+ FailReinitialize100_MultiThread_DelegatingRenderer) {
+ times_to_fail_reinitialize_ = 100;
+ times_to_fail_recreate_ = 0;
+ times_to_lose_on_recreate_ = 0;
+ RunTest(true, true);
+}
+
+TEST_F(LayerTreeHostContextTestLostContextFails,
+ FailRecreate100_SingleThread_DirectRenderer) {
+ times_to_fail_reinitialize_ = 0;
+ times_to_fail_recreate_ = 100;
+ times_to_lose_on_recreate_ = 0;
+ RunTest(false, false);
}
TEST_F(LayerTreeHostContextTestLostContextFails,
- FailRecreate100_SingleThread) {
+ FailRecreate100_SingleThread_DelegatingRenderer) {
times_to_fail_reinitialize_ = 0;
times_to_fail_recreate_ = 100;
times_to_lose_on_recreate_ = 0;
- RunTest(false);
+ RunTest(false, true);
}
TEST_F(LayerTreeHostContextTestLostContextFails,
- FailRecreate100_MultiThread) {
+ FailRecreate100_MultiThread_DirectRenderer) {
times_to_fail_reinitialize_ = 0;
times_to_fail_recreate_ = 100;
times_to_lose_on_recreate_ = 0;
- RunTest(true);
+ RunTest(true, false);
}
TEST_F(LayerTreeHostContextTestLostContextFails,
- LoseOnRecreate100_SingleThread) {
+ FailRecreate100_MultiThread_DelegatingRenderer) {
+ times_to_fail_reinitialize_ = 0;
+ times_to_fail_recreate_ = 100;
+ times_to_lose_on_recreate_ = 0;
+ RunTest(true, true);
+}
+
+TEST_F(LayerTreeHostContextTestLostContextFails,
+ LoseOnRecreate100_SingleThread_DirectRenderer) {
+ times_to_fail_reinitialize_ = 0;
+ times_to_fail_recreate_ = 0;
+ times_to_lose_on_recreate_ = 100;
+ RunTest(false, false);
+}
+
+TEST_F(LayerTreeHostContextTestLostContextFails,
+ LoseOnRecreate100_SingleThread_DelegatingRenderer) {
+ times_to_fail_reinitialize_ = 0;
+ times_to_fail_recreate_ = 0;
+ times_to_lose_on_recreate_ = 100;
+ RunTest(false, true);
+}
+
+TEST_F(LayerTreeHostContextTestLostContextFails,
+ LoseOnRecreate100_MultiThread_DirectRenderer) {
times_to_fail_reinitialize_ = 0;
times_to_fail_recreate_ = 0;
times_to_lose_on_recreate_ = 100;
- RunTest(false);
+ RunTest(true, false);
}
TEST_F(LayerTreeHostContextTestLostContextFails,
- LoseOnRecreate100_MultiThread) {
+ LoseOnRecreate100_MultiThread_DelegatingRenderer) {
times_to_fail_reinitialize_ = 0;
times_to_fail_recreate_ = 0;
times_to_lose_on_recreate_ = 100;
- RunTest(true);
+ RunTest(true, true);
}
class LayerTreeHostContextTestFinishAllRenderingAfterLoss
@@ -750,27 +822,51 @@ class LayerTreeHostContextTestLostContextAndEvictTextures
};
TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
- LoseAfterEvict_SingleThread) {
+ LoseAfterEvict_SingleThread_DirectRenderer) {
+ lose_after_evict_ = true;
+ RunTest(false, false);
+}
+
+TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
+ LoseAfterEvict_SingleThread_DelegatingRenderer) {
+ lose_after_evict_ = true;
+ RunTest(false, true);
+}
+
+TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
+ LoseAfterEvict_MultiThread_DirectRenderer) {
lose_after_evict_ = true;
- RunTest(false);
+ RunTest(true, false);
}
TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
- LoseAfterEvict_MultiThread) {
+ LoseAfterEvict_MultiThread_DelegatingRenderer) {
lose_after_evict_ = true;
- RunTest(true);
+ RunTest(true, true);
+}
+
+TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
+ LoseBeforeEvict_SingleThread_DirectRenderer) {
+ lose_after_evict_ = false;
+ RunTest(false, false);
+}
+
+TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
+ LoseBeforeEvict_SingleThread_DelegatingRenderer) {
+ lose_after_evict_ = false;
+ RunTest(false, true);
}
TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
- LoseBeforeEvict_SingleThread) {
+ LoseBeforeEvict_MultiThread_DirectRenderer) {
lose_after_evict_ = false;
- RunTest(false);
+ RunTest(true, false);
}
TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
- LoseBeforeEvict_MultiThread) {
+ LoseBeforeEvict_MultiThread_DelegatingRenderer) {
lose_after_evict_ = false;
- RunTest(true);
+ RunTest(true, true);
}
class LayerTreeHostContextTestLostContextWhileUpdatingResources
@@ -1373,12 +1469,12 @@ class LayerTreeHostTestCannotCreateIfCannotCreateOutputSurface
LayerTreeHostTestCannotCreateIfCannotCreateOutputSurface()
: FakeLayerTreeHostClient(FakeLayerTreeHostClient::DIRECT_3D) {}
- // FakeLayerTreeHostClient
+ // FakeLayerTreeHostClient implementation.
virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE {
return scoped_ptr<OutputSurface>();
}
- void RunTest(bool threaded) {
+ void RunTest(bool threaded, bool delegating_renderer) {
scoped_ptr<base::Thread> impl_thread;
scoped_ptr<cc::Thread> impl_ccthread(NULL);
if (threaded) {

Powered by Google App Engine
This is Rietveld 408576698