| 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 a448237175eaccedb436b473ed8e27467be7717f..bd303e3fae4189621c7725d230ce2f3273fd2fce 100644
|
| --- a/cc/trees/layer_tree_host_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_unittest.cc
|
| @@ -5520,94 +5520,6 @@ class LayerTreeHostTestOneActivatePerPrepareTiles : public LayerTreeHostTest {
|
|
|
| SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestOneActivatePerPrepareTiles);
|
|
|
| -class LayerTreeHostTestFrameTimingRequestsSaveTimestamps
|
| - : public LayerTreeHostTest {
|
| - public:
|
| - LayerTreeHostTestFrameTimingRequestsSaveTimestamps()
|
| - : check_results_on_commit_(false) {}
|
| -
|
| - void SetupTree() override {
|
| - scoped_refptr<FakePictureLayer> root_layer =
|
| - FakePictureLayer::Create(&client_);
|
| - root_layer->SetBounds(gfx::Size(200, 200));
|
| - root_layer->SetIsDrawable(true);
|
| -
|
| - scoped_refptr<FakePictureLayer> child_layer =
|
| - FakePictureLayer::Create(&client_);
|
| - child_layer->SetBounds(gfx::Size(1500, 1500));
|
| - child_layer->SetIsDrawable(true);
|
| -
|
| - std::vector<FrameTimingRequest> requests;
|
| - requests.push_back(FrameTimingRequest(1, gfx::Rect(0, 0, 100, 100)));
|
| - requests.push_back(FrameTimingRequest(2, gfx::Rect(300, 0, 100, 100)));
|
| - child_layer->SetFrameTimingRequests(requests);
|
| -
|
| - root_layer->AddChild(child_layer);
|
| - layer_tree_host()->SetRootLayer(root_layer);
|
| - LayerTreeHostTest::SetupTree();
|
| - client_.set_bounds(root_layer->bounds());
|
| - }
|
| -
|
| - void BeginTest() override { PostSetNeedsCommitToMainThread(); }
|
| -
|
| - void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override {
|
| - if (!check_results_on_commit_)
|
| - return;
|
| -
|
| - // Since in reality, the events will be read by LayerTreeHost during commit,
|
| - // we check the requests here to ensure that they are correct at the next
|
| - // commit time (as opposed to checking in DrawLayers for instance).
|
| - // TODO(vmpstr): Change this to read things from the main thread when this
|
| - // information is propagated to the main thread (not yet implemented).
|
| - FrameTimingTracker* tracker = host_impl->frame_timing_tracker();
|
| -
|
| - // Check composite events.
|
| - {
|
| - std::unique_ptr<FrameTimingTracker::CompositeTimingSet> timing_set =
|
| - tracker->GroupCompositeCountsByRectId();
|
| - EXPECT_EQ(1u, timing_set->size());
|
| - auto rect_1_it = timing_set->find(1);
|
| - EXPECT_TRUE(rect_1_it != timing_set->end());
|
| - const auto& timing_events = rect_1_it->second;
|
| - EXPECT_EQ(1u, timing_events.size());
|
| - EXPECT_EQ(host_impl->active_tree()->source_frame_number(),
|
| - timing_events[0].frame_id);
|
| - EXPECT_GT(timing_events[0].timestamp, base::TimeTicks());
|
| - }
|
| -
|
| - // Check main frame events.
|
| - {
|
| - std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> timing_set =
|
| - tracker->GroupMainFrameCountsByRectId();
|
| - EXPECT_EQ(2u, timing_set->size());
|
| - auto rect_1_it = timing_set->find(1);
|
| - EXPECT_TRUE(rect_1_it != timing_set->end());
|
| - const auto& timing_events = rect_1_it->second;
|
| - EXPECT_EQ(1u, timing_events.size());
|
| - EXPECT_EQ(host_impl->active_tree()->source_frame_number(),
|
| - timing_events[0].frame_id);
|
| - EXPECT_GT(timing_events[0].timestamp, base::TimeTicks());
|
| - EXPECT_GT(timing_events[0].end_time, timing_events[0].timestamp);
|
| - }
|
| -
|
| - EndTest();
|
| - }
|
| -
|
| - void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
|
| - check_results_on_commit_ = true;
|
| - PostSetNeedsCommitToMainThread();
|
| - }
|
| -
|
| - void AfterTest() override {}
|
| -
|
| - private:
|
| - FakeContentLayerClient client_;
|
| - bool check_results_on_commit_;
|
| -};
|
| -
|
| -// Frame timing is not implemented in single thread proxy.
|
| -MULTI_THREAD_TEST_F(LayerTreeHostTestFrameTimingRequestsSaveTimestamps);
|
| -
|
| class LayerTreeHostTestActivationCausesPrepareTiles : public LayerTreeHostTest {
|
| public:
|
| LayerTreeHostTestActivationCausesPrepareTiles()
|
|
|