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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <tuple> | 9 #include <tuple> |
10 | 10 |
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 // Test that a resize event is sent if WasResized() is called after a | 807 // Test that a resize event is sent if WasResized() is called after a |
808 // ScreenInfo change. | 808 // ScreenInfo change. |
809 TEST_F(RenderWidgetHostTest, ResizeScreenInfo) { | 809 TEST_F(RenderWidgetHostTest, ResizeScreenInfo) { |
810 ScreenInfo screen_info; | 810 ScreenInfo screen_info; |
811 screen_info.device_scale_factor = 1.f; | 811 screen_info.device_scale_factor = 1.f; |
812 screen_info.rect = blink::WebRect(0, 0, 800, 600); | 812 screen_info.rect = blink::WebRect(0, 0, 800, 600); |
813 screen_info.available_rect = blink::WebRect(0, 0, 800, 600); | 813 screen_info.available_rect = blink::WebRect(0, 0, 800, 600); |
814 screen_info.orientation_angle = 0; | 814 screen_info.orientation_angle = 0; |
815 screen_info.orientation_type = SCREEN_ORIENTATION_VALUES_PORTRAIT_PRIMARY; | 815 screen_info.orientation_type = SCREEN_ORIENTATION_VALUES_PORTRAIT_PRIMARY; |
816 | 816 |
817 auto host_delegate = | 817 auto* host_delegate = |
818 static_cast<MockRenderWidgetHostDelegate*>(host_->delegate()); | 818 static_cast<MockRenderWidgetHostDelegate*>(host_->delegate()); |
819 | 819 |
820 host_delegate->SetScreenInfo(screen_info); | 820 host_delegate->SetScreenInfo(screen_info); |
821 host_->WasResized(); | 821 host_->WasResized(); |
822 EXPECT_FALSE(host_->resize_ack_pending_); | 822 EXPECT_FALSE(host_->resize_ack_pending_); |
823 EXPECT_TRUE(process_->sink().GetUniqueMessageMatching(ViewMsg_Resize::ID)); | 823 EXPECT_TRUE(process_->sink().GetUniqueMessageMatching(ViewMsg_Resize::ID)); |
824 process_->sink().ClearMessages(); | 824 process_->sink().ClearMessages(); |
825 | 825 |
826 screen_info.orientation_angle = 180; | 826 screen_info.orientation_angle = 180; |
827 screen_info.orientation_type = SCREEN_ORIENTATION_VALUES_LANDSCAPE_PRIMARY; | 827 screen_info.orientation_type = SCREEN_ORIENTATION_VALUES_LANDSCAPE_PRIMARY; |
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1743 ui::LatencyInfo()); | 1743 ui::LatencyInfo()); |
1744 | 1744 |
1745 | 1745 |
1746 // Tests RWHI::ForwardWheelEventWithLatencyInfo(). | 1746 // Tests RWHI::ForwardWheelEventWithLatencyInfo(). |
1747 SimulateWheelEventWithLatencyInfo(-5, 0, 0, true, ui::LatencyInfo()); | 1747 SimulateWheelEventWithLatencyInfo(-5, 0, 0, true, ui::LatencyInfo()); |
1748 | 1748 |
1749 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); | 1749 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); |
1750 } | 1750 } |
1751 | 1751 |
1752 } // namespace content | 1752 } // namespace content |
OLD | NEW |