| 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 6ea6b7ffb0905c2d0233b228e7dd59b0c1f3522a..e00023919590f044ccd8bd85f3b486aa530e6302 100644
|
| --- a/cc/trees/layer_tree_host_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_unittest.cc
|
| @@ -5689,6 +5689,7 @@
|
| : will_begin_impl_frame_count_(0), did_finish_impl_frame_count_(0) {}
|
|
|
| void BeginTest() override {
|
| + // Kick off the test with a commit.
|
| PostSetNeedsCommitToMainThread();
|
| }
|
|
|
| @@ -5733,70 +5734,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:
|
|
|