| OLD | NEW |
| 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 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1659 aura::Env::GetInstance()->set_last_mouse_location(gfx::Point(161, 161)); | 1659 aura::Env::GetInstance()->set_last_mouse_location(gfx::Point(161, 161)); |
| 1660 view_->UpdateCursorIfOverSelf(); | 1660 view_->UpdateCursorIfOverSelf(); |
| 1661 EXPECT_EQ(0, cursor_client.calls_to_set_cursor()); | 1661 EXPECT_EQ(0, cursor_client.calls_to_set_cursor()); |
| 1662 } | 1662 } |
| 1663 | 1663 |
| 1664 cc::CompositorFrame MakeDelegatedFrame(float scale_factor, | 1664 cc::CompositorFrame MakeDelegatedFrame(float scale_factor, |
| 1665 gfx::Size size, | 1665 gfx::Size size, |
| 1666 gfx::Rect damage) { | 1666 gfx::Rect damage) { |
| 1667 cc::CompositorFrame frame; | 1667 cc::CompositorFrame frame; |
| 1668 frame.metadata.device_scale_factor = scale_factor; | 1668 frame.metadata.device_scale_factor = scale_factor; |
| 1669 frame.delegated_frame_data.reset(new cc::DelegatedFrameData); |
| 1669 | 1670 |
| 1670 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create(); | 1671 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create(); |
| 1671 pass->SetNew( | 1672 pass->SetNew( |
| 1672 cc::RenderPassId(1, 1), gfx::Rect(size), damage, gfx::Transform()); | 1673 cc::RenderPassId(1, 1), gfx::Rect(size), damage, gfx::Transform()); |
| 1673 frame.render_pass_list.push_back(std::move(pass)); | 1674 frame.delegated_frame_data->render_pass_list.push_back(std::move(pass)); |
| 1674 if (!size.IsEmpty()) { | 1675 if (!size.IsEmpty()) { |
| 1675 cc::TransferableResource resource; | 1676 cc::TransferableResource resource; |
| 1676 resource.id = 1; | 1677 resource.id = 1; |
| 1677 frame.resource_list.push_back(std::move(resource)); | 1678 frame.delegated_frame_data->resource_list.push_back(std::move(resource)); |
| 1678 } | 1679 } |
| 1679 return frame; | 1680 return frame; |
| 1680 } | 1681 } |
| 1681 | 1682 |
| 1682 // If the ui::Compositor has been reset then resources are returned back to the | 1683 // If the ui::Compositor has been reset then resources are returned back to the |
| 1683 // client in response to the swap. This test verifies that the returned | 1684 // client in response to the swap. This test verifies that the returned |
| 1684 // resources are indeed reported as being in response to a swap. | 1685 // resources are indeed reported as being in response to a swap. |
| 1685 TEST_F(RenderWidgetHostViewAuraTest, ResettingCompositorReturnsResources) { | 1686 TEST_F(RenderWidgetHostViewAuraTest, ResettingCompositorReturnsResources) { |
| 1686 FakeSurfaceObserver manager_observer; | 1687 FakeSurfaceObserver manager_observer; |
| 1687 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); | 1688 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); |
| (...skipping 2986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4674 | 4675 |
| 4675 // Retrieve the selected text from clipboard and verify it is as expected. | 4676 // Retrieve the selected text from clipboard and verify it is as expected. |
| 4676 base::string16 result_text; | 4677 base::string16 result_text; |
| 4677 clipboard->ReadText(ui::CLIPBOARD_TYPE_SELECTION, &result_text); | 4678 clipboard->ReadText(ui::CLIPBOARD_TYPE_SELECTION, &result_text); |
| 4678 EXPECT_EQ(expected_text, result_text); | 4679 EXPECT_EQ(expected_text, result_text); |
| 4679 } | 4680 } |
| 4680 } | 4681 } |
| 4681 #endif | 4682 #endif |
| 4682 | 4683 |
| 4683 } // namespace content | 4684 } // namespace content |
| OLD | NEW |