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/public/test/render_widget_test.h" | 5 #include "content/public/test/render_widget_test.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 void RenderWidgetTest::TestOnResize() { | 36 void RenderWidgetTest::TestOnResize() { |
37 RenderWidget* widget = static_cast<RenderViewImpl*>(view_); | 37 RenderWidget* widget = static_cast<RenderViewImpl*>(view_); |
38 | 38 |
39 // The initial bounds is empty, so setting it to the same thing should do | 39 // The initial bounds is empty, so setting it to the same thing should do |
40 // nothing. | 40 // nothing. |
41 ViewMsg_Resize_Params resize_params; | 41 ViewMsg_Resize_Params resize_params; |
42 resize_params.screen_info = blink::WebScreenInfo(); | 42 resize_params.screen_info = blink::WebScreenInfo(); |
43 resize_params.new_size = gfx::Size(); | 43 resize_params.new_size = gfx::Size(); |
44 resize_params.physical_backing_size = gfx::Size(); | 44 resize_params.physical_backing_size = gfx::Size(); |
45 resize_params.overdraw_bottom_height = 0.f; | 45 resize_params.top_controls_layout_height = 0.f; |
46 resize_params.resizer_rect = gfx::Rect(); | 46 resize_params.resizer_rect = gfx::Rect(); |
47 resize_params.is_fullscreen = false; | 47 resize_params.is_fullscreen = false; |
48 widget->OnResize(resize_params); | 48 widget->OnResize(resize_params); |
49 EXPECT_FALSE(widget->next_paint_is_resize_ack()); | 49 EXPECT_FALSE(widget->next_paint_is_resize_ack()); |
50 | 50 |
51 // Setting empty physical backing size should not send the ack. | 51 // Setting empty physical backing size should not send the ack. |
52 resize_params.new_size = gfx::Size(10, 10); | 52 resize_params.new_size = gfx::Size(10, 10); |
53 widget->OnResize(resize_params); | 53 widget->OnResize(resize_params); |
54 EXPECT_FALSE(widget->next_paint_is_resize_ack()); | 54 EXPECT_FALSE(widget->next_paint_is_resize_ack()); |
55 | 55 |
(...skipping 25 matching lines...) Expand all Loading... |
81 widget->OnResize(resize_params); | 81 widget->OnResize(resize_params); |
82 EXPECT_FALSE(widget->next_paint_is_resize_ack()); | 82 EXPECT_FALSE(widget->next_paint_is_resize_ack()); |
83 | 83 |
84 resize_params.screen_info.orientationType = | 84 resize_params.screen_info.orientationType = |
85 blink::WebScreenOrientationPortraitPrimary; | 85 blink::WebScreenOrientationPortraitPrimary; |
86 widget->OnResize(resize_params); | 86 widget->OnResize(resize_params); |
87 EXPECT_FALSE(widget->next_paint_is_resize_ack()); | 87 EXPECT_FALSE(widget->next_paint_is_resize_ack()); |
88 } | 88 } |
89 | 89 |
90 } // namespace content | 90 } // namespace content |
OLD | NEW |