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/common/resize_params.h" | 5 #include "content/common/resize_params.h" |
6 #include "content/public/test/render_view_test.h" | 6 #include "content/public/test/render_view_test.h" |
7 #include "content/renderer/render_view_impl.h" | 7 #include "content/renderer/render_view_impl.h" |
8 #include "content/renderer/render_widget.h" | 8 #include "content/renderer/render_widget.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 18 matching lines...) Expand all Loading... |
29 }; | 29 }; |
30 | 30 |
31 TEST_F(RenderWidgetTest, OnResize) { | 31 TEST_F(RenderWidgetTest, OnResize) { |
32 // The initial bounds is empty, so setting it to the same thing should do | 32 // The initial bounds is empty, so setting it to the same thing should do |
33 // nothing. | 33 // nothing. |
34 ResizeParams resize_params; | 34 ResizeParams resize_params; |
35 resize_params.screen_info = ScreenInfo(); | 35 resize_params.screen_info = ScreenInfo(); |
36 resize_params.new_size = gfx::Size(); | 36 resize_params.new_size = gfx::Size(); |
37 resize_params.physical_backing_size = gfx::Size(); | 37 resize_params.physical_backing_size = gfx::Size(); |
38 resize_params.top_controls_height = 0.f; | 38 resize_params.top_controls_height = 0.f; |
39 resize_params.top_controls_shrink_blink_size = false; | 39 resize_params.browser_controls_shrink_blink_size = false; |
40 resize_params.is_fullscreen_granted = false; | 40 resize_params.is_fullscreen_granted = false; |
41 resize_params.needs_resize_ack = false; | 41 resize_params.needs_resize_ack = false; |
42 OnResize(resize_params); | 42 OnResize(resize_params); |
43 EXPECT_EQ(resize_params.needs_resize_ack, next_paint_is_resize_ack()); | 43 EXPECT_EQ(resize_params.needs_resize_ack, next_paint_is_resize_ack()); |
44 | 44 |
45 // Setting empty physical backing size should not send the ack. | 45 // Setting empty physical backing size should not send the ack. |
46 resize_params.new_size = gfx::Size(10, 10); | 46 resize_params.new_size = gfx::Size(10, 10); |
47 OnResize(resize_params); | 47 OnResize(resize_params); |
48 EXPECT_EQ(resize_params.needs_resize_ack, next_paint_is_resize_ack()); | 48 EXPECT_EQ(resize_params.needs_resize_ack, next_paint_is_resize_ack()); |
49 | 49 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 LoadHTML("<div>NOT EDITABLE</div>"); | 132 LoadHTML("<div>NOT EDITABLE</div>"); |
133 gfx::Range range; | 133 gfx::Range range; |
134 GetCompositionRange(&range); | 134 GetCompositionRange(&range); |
135 // If this test ever starts failing, one likely outcome is that WebRange | 135 // If this test ever starts failing, one likely outcome is that WebRange |
136 // and gfx::Range::InvalidRange are no longer expressed in the same | 136 // and gfx::Range::InvalidRange are no longer expressed in the same |
137 // values of start/end. | 137 // values of start/end. |
138 EXPECT_FALSE(range.IsValid()); | 138 EXPECT_FALSE(range.IsValid()); |
139 } | 139 } |
140 | 140 |
141 } // namespace content | 141 } // namespace content |
OLD | NEW |