Index: cc/trees/layer_tree_host_unittest.cc |
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc |
index 6d9c9c67199fbe1de37c8e323c741e004d8b6798..f6e5838836df9a8e830052359c7482494afe602f 100644 |
--- a/cc/trees/layer_tree_host_unittest.cc |
+++ b/cc/trees/layer_tree_host_unittest.cc |
@@ -231,13 +231,13 @@ class LayerTreeHostTestReadyToDrawEmpty : public LayerTreeHostTest { |
void AfterTest() override { |
EXPECT_TRUE(did_notify_ready_to_draw_); |
EXPECT_TRUE(all_tiles_required_for_draw_are_ready_to_draw_); |
- EXPECT_EQ(size_t(0), required_for_draw_count_); |
+ EXPECT_EQ(0, required_for_draw_count_); |
} |
protected: |
bool did_notify_ready_to_draw_; |
bool all_tiles_required_for_draw_are_ready_to_draw_; |
- size_t required_for_draw_count_; |
+ int required_for_draw_count_; |
}; |
SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestReadyToDrawEmpty); |
@@ -261,7 +261,7 @@ class LayerTreeHostTestReadyToDrawNonEmpty |
void AfterTest() override { |
EXPECT_TRUE(did_notify_ready_to_draw_); |
EXPECT_TRUE(all_tiles_required_for_draw_are_ready_to_draw_); |
- EXPECT_LE(size_t(1), required_for_draw_count_); |
+ EXPECT_LE(1, required_for_draw_count_); |
} |
private: |
@@ -272,6 +272,32 @@ class LayerTreeHostTestReadyToDrawNonEmpty |
// single threaded mode. |
SINGLE_THREAD_TEST_F(LayerTreeHostTestReadyToDrawNonEmpty); |
+class LayerTreeHostTestReadyToDrawVisibility |
brianderson
2015/07/16 22:36:14
Can you add a comment explaining what this test do
sunnyps
2015/07/16 22:51:44
Done.
|
+ : public LayerTreeHostTestReadyToDrawNonEmpty { |
+ public: |
+ LayerTreeHostTestReadyToDrawVisibility() |
+ : LayerTreeHostTestReadyToDrawNonEmpty(), did_commit_(false) {} |
+ |
+ void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { |
+ EXPECT_FALSE(did_commit_); |
+ did_commit_ = true; |
+ PostSetVisibleToMainThread(false); |
+ } |
+ |
+ void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl, |
+ bool visible) override { |
+ if (!visible) { |
+ EXPECT_TRUE(did_commit_); |
+ PostSetVisibleToMainThread(true); |
brianderson
2015/07/16 22:36:14
To test the test, could you:
DCHECK(!all_tiles_req
sunnyps
2015/07/16 22:51:44
Done.
|
+ } |
+ } |
+ |
+ protected: |
+ bool did_commit_; |
+}; |
+ |
+SINGLE_THREAD_TEST_F(LayerTreeHostTestReadyToDrawVisibility); |
+ |
class LayerTreeHostFreeWorkerContextResourcesTest : public LayerTreeHostTest { |
public: |
scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface() override { |