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

Unified Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 681713002: Update from chromium https://crrev.com/301315 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 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/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5dafb7f01f48bcddd78cfd5aa7265d5fb1a27fba..fb05300a331378932681f760446859c076ffb10a 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -402,7 +402,7 @@ class MultipleCompositeDoesNotCreateOutputSurface
int request_count_;
};
-SINGLE_THREAD_TEST_F(MultipleCompositeDoesNotCreateOutputSurface);
+SINGLE_THREAD_NOIMPL_TEST_F(MultipleCompositeDoesNotCreateOutputSurface);
class FailedCreateDoesNotCreateExtraOutputSurface
: public LayerTreeHostContextTest {
@@ -440,7 +440,78 @@ class FailedCreateDoesNotCreateExtraOutputSurface
int request_count_;
};
-SINGLE_THREAD_TEST_F(FailedCreateDoesNotCreateExtraOutputSurface);
+SINGLE_THREAD_NOIMPL_TEST_F(FailedCreateDoesNotCreateExtraOutputSurface);
+
+class LayerTreeHostContextTestCommitAfterDelayedOutputSurface
+ : public LayerTreeHostContextTest {
+ public:
+ LayerTreeHostContextTestCommitAfterDelayedOutputSurface()
+ : LayerTreeHostContextTest(), creating_output_(false) {}
+
+ void InitializeSettings(LayerTreeSettings* settings) override {
+ settings->single_thread_proxy_scheduler = false;
+ }
+
+ void RequestNewOutputSurface(bool fallback) override {
+ MainThreadTaskRunner()->PostTask(
+ FROM_HERE,
+ base::Bind(&LayerTreeHostContextTestCommitAfterDelayedOutputSurface::
+ CreateAndSetOutputSurface,
+ base::Unretained(this),
+ fallback));
+ }
+
+ void CreateAndSetOutputSurface(bool fallback) {
+ creating_output_ = true;
+ layer_tree_host()->SetOutputSurface(
+ LayerTreeHostContextTest::CreateOutputSurface(fallback));
+ }
+
+ void BeginTest() override { layer_tree_host()->Composite(base::TimeTicks()); }
+
+ void ScheduleComposite() override {
+ if (creating_output_)
+ EndTest();
+ }
+
+ void AfterTest() override {}
+
+ bool creating_output_;
+};
+
+SINGLE_THREAD_NOIMPL_TEST_F(
+ LayerTreeHostContextTestCommitAfterDelayedOutputSurface);
+
+class LayerTreeHostContextTestAvoidUnnecessaryComposite
+ : public LayerTreeHostContextTest {
+ public:
+ LayerTreeHostContextTestAvoidUnnecessaryComposite()
+ : LayerTreeHostContextTest(), in_composite_(false) {}
+
+ void InitializeSettings(LayerTreeSettings* settings) override {
+ settings->single_thread_proxy_scheduler = false;
+ }
+
+ void RequestNewOutputSurface(bool fallback) override {
+ layer_tree_host()->SetOutputSurface(
+ LayerTreeHostContextTest::CreateOutputSurface(fallback));
+ EndTest();
+ }
+
+ void BeginTest() override {
+ in_composite_ = true;
+ layer_tree_host()->Composite(base::TimeTicks());
+ in_composite_ = false;
+ }
+
+ void ScheduleComposite() override { EXPECT_FALSE(in_composite_); }
+
+ void AfterTest() override {}
+
+ bool in_composite_;
+};
+
+SINGLE_THREAD_NOIMPL_TEST_F(LayerTreeHostContextTestAvoidUnnecessaryComposite);
class LayerTreeHostContextTestLostContextSucceedsWithContent
: public LayerTreeHostContextTestLostContextSucceeds {
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698