| 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 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 2998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4684 | 4683 |
| 4685 // Retrieve the selected text from clipboard and verify it is as expected. | 4684 // Retrieve the selected text from clipboard and verify it is as expected. |
| 4686 base::string16 result_text; | 4685 base::string16 result_text; |
| 4687 clipboard->ReadText(ui::CLIPBOARD_TYPE_SELECTION, &result_text); | 4686 clipboard->ReadText(ui::CLIPBOARD_TYPE_SELECTION, &result_text); |
| 4688 EXPECT_EQ(expected_text, result_text); | 4687 EXPECT_EQ(expected_text, result_text); |
| 4689 } | 4688 } |
| 4690 } | 4689 } |
| 4691 #endif | 4690 #endif |
| 4692 | 4691 |
| 4693 } // namespace content | 4692 } // namespace content |
| OLD | NEW |