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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Issue 2449853004: Getting rid of DelegatedFrameData (Closed)
Patch Set: IsEmpty + rebase Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <tuple> 10 #include <tuple>
(...skipping 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after
1656 aura::Env::GetInstance()->set_last_mouse_location(gfx::Point(161, 161)); 1656 aura::Env::GetInstance()->set_last_mouse_location(gfx::Point(161, 161));
1657 view_->UpdateCursorIfOverSelf(); 1657 view_->UpdateCursorIfOverSelf();
1658 EXPECT_EQ(0, cursor_client.calls_to_set_cursor()); 1658 EXPECT_EQ(0, cursor_client.calls_to_set_cursor());
1659 } 1659 }
1660 1660
1661 cc::CompositorFrame MakeDelegatedFrame(float scale_factor, 1661 cc::CompositorFrame MakeDelegatedFrame(float scale_factor,
1662 gfx::Size size, 1662 gfx::Size size,
1663 gfx::Rect damage) { 1663 gfx::Rect damage) {
1664 cc::CompositorFrame frame; 1664 cc::CompositorFrame frame;
1665 frame.metadata.device_scale_factor = scale_factor; 1665 frame.metadata.device_scale_factor = scale_factor;
1666 frame.delegated_frame_data.reset(new cc::DelegatedFrameData);
1667 1666
1668 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create(); 1667 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create();
1669 pass->SetNew( 1668 pass->SetNew(
1670 cc::RenderPassId(1, 1), gfx::Rect(size), damage, gfx::Transform()); 1669 cc::RenderPassId(1, 1), gfx::Rect(size), damage, gfx::Transform());
1671 frame.delegated_frame_data->render_pass_list.push_back(std::move(pass)); 1670 frame.render_pass_list.push_back(std::move(pass));
1672 if (!size.IsEmpty()) { 1671 if (!size.IsEmpty()) {
1673 cc::TransferableResource resource; 1672 cc::TransferableResource resource;
1674 resource.id = 1; 1673 resource.id = 1;
1675 frame.delegated_frame_data->resource_list.push_back(std::move(resource)); 1674 frame.resource_list.push_back(std::move(resource));
1676 } 1675 }
1677 return frame; 1676 return frame;
1678 } 1677 }
1679 1678
1680 // If the ui::Compositor has been reset then resources are returned back to the 1679 // If the ui::Compositor has been reset then resources are returned back to the
1681 // client in response to the swap. This test verifies that the returned 1680 // client in response to the swap. This test verifies that the returned
1682 // resources are indeed reported as being in response to a swap. 1681 // resources are indeed reported as being in response to a swap.
1683 TEST_F(RenderWidgetHostViewAuraTest, ResettingCompositorReturnsResources) { 1682 TEST_F(RenderWidgetHostViewAuraTest, ResettingCompositorReturnsResources) {
1684 FakeSurfaceObserver manager_observer; 1683 FakeSurfaceObserver manager_observer;
1685 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); 1684 ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
(...skipping 3004 matching lines...) Expand 10 before | Expand all | Expand 10 after
4690 4689
4691 // Retrieve the selected text from clipboard and verify it is as expected. 4690 // Retrieve the selected text from clipboard and verify it is as expected.
4692 base::string16 result_text; 4691 base::string16 result_text;
4693 clipboard->ReadText(ui::CLIPBOARD_TYPE_SELECTION, &result_text); 4692 clipboard->ReadText(ui::CLIPBOARD_TYPE_SELECTION, &result_text);
4694 EXPECT_EQ(expected_text, result_text); 4693 EXPECT_EQ(expected_text, result_text);
4695 } 4694 }
4696 } 4695 }
4697 #endif 4696 #endif
4698 4697
4699 } // namespace content 4698 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698