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 64eebdc0d811a64e27f3ab96d6a35fdf61001649..df01000e69630c891a335dfa777bf44e732b3d86 100644 |
--- a/cc/trees/layer_tree_host_unittest.cc |
+++ b/cc/trees/layer_tree_host_unittest.cc |
@@ -5591,6 +5591,7 @@ |
: will_begin_impl_frame_count_(0), did_finish_impl_frame_count_(0) {} |
void BeginTest() override { |
+ // Kick off the test with a commit. |
PostSetNeedsCommitToMainThread(); |
} |
@@ -5635,70 +5636,6 @@ |
SINGLE_AND_MULTI_THREAD_TEST_F( |
LayerTreeHostTestWillBeginImplFrameHasDidFinishImplFrame); |
- |
-::testing::AssertionResult AssertFrameTimeContained( |
- const char* haystack_expr, |
- const char* needle_expr, |
- const std::vector<BeginFrameArgs>& haystack, |
- const BeginFrameArgs& needle) { |
- auto failure = ::testing::AssertionFailure() |
- << needle.frame_time << " (" << needle_expr |
- << ") not found in " << haystack_expr; |
- |
- if (haystack.size() == 0) { |
- failure << " which is empty."; |
- } else { |
- failure << " which contains:\n"; |
- for (size_t i = 0; i < haystack.size(); i++) { |
- if (haystack[i].frame_time == needle.frame_time) |
- return ::testing::AssertionSuccess(); |
- failure << " [" << i << "]: " << haystack[i].frame_time << "\n"; |
- } |
- } |
- |
- return failure; |
-} |
- |
-class LayerTreeHostTestBeginMainFrameTimeIsAlsoImplTime |
- : public LayerTreeHostTest { |
- public: |
- LayerTreeHostTestBeginMainFrameTimeIsAlsoImplTime() |
- : impl_frame_args_(), will_begin_impl_frame_count_(0) {} |
- |
- void BeginTest() override { |
- // Kick off the test with a commit. |
- PostSetNeedsCommitToMainThread(); |
- } |
- |
- void WillBeginImplFrameOnThread(LayerTreeHostImpl* impl, |
- const BeginFrameArgs& args) override { |
- impl_frame_args_.push_back(args); |
- |
- will_begin_impl_frame_count_++; |
- if (will_begin_impl_frame_count_ < 10) |
- PostSetNeedsCommitToMainThread(); |
- } |
- |
- void BeginMainFrame(const BeginFrameArgs& args) override { |
- ASSERT_GT(impl_frame_args_.size(), 0U) |
- << "BeginMainFrame called before BeginImplFrame called!"; |
- EXPECT_PRED_FORMAT2(AssertFrameTimeContained, impl_frame_args_, args); |
- } |
- |
- void SendBeginMainFrameNotExpectedSoon() override { EndTest(); } |
- |
- void AfterTest() override { |
- EXPECT_GT(impl_frame_args_.size(), 0U); |
- EXPECT_GE(will_begin_impl_frame_count_, 10); |
- } |
- |
- private: |
- std::vector<BeginFrameArgs> impl_frame_args_; |
- int will_begin_impl_frame_count_; |
-}; |
- |
-SINGLE_AND_MULTI_THREAD_IMPL_TEST_F( |
- LayerTreeHostTestBeginMainFrameTimeIsAlsoImplTime); |
class LayerTreeHostTestSendBeginFramesToChildren : public LayerTreeHostTest { |
public: |