| 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 19 matching lines...) Expand all Loading... |
| 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.top_controls_shrink_blink_size = false; |
| 40 resize_params.resizer_rect = gfx::Rect(); | |
| 41 resize_params.is_fullscreen_granted = false; | 40 resize_params.is_fullscreen_granted = false; |
| 42 resize_params.needs_resize_ack = false; | 41 resize_params.needs_resize_ack = false; |
| 43 OnResize(resize_params); | 42 OnResize(resize_params); |
| 44 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()); |
| 45 | 44 |
| 46 // Setting empty physical backing size should not send the ack. | 45 // Setting empty physical backing size should not send the ack. |
| 47 resize_params.new_size = gfx::Size(10, 10); | 46 resize_params.new_size = gfx::Size(10, 10); |
| 48 OnResize(resize_params); | 47 OnResize(resize_params); |
| 49 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()); |
| 50 | 49 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 LoadHTML("<div>NOT EDITABLE</div>"); | 132 LoadHTML("<div>NOT EDITABLE</div>"); |
| 134 gfx::Range range; | 133 gfx::Range range; |
| 135 GetCompositionRange(&range); | 134 GetCompositionRange(&range); |
| 136 // 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 |
| 137 // and gfx::Range::InvalidRange are no longer expressed in the same | 136 // and gfx::Range::InvalidRange are no longer expressed in the same |
| 138 // values of start/end. | 137 // values of start/end. |
| 139 EXPECT_FALSE(range.IsValid()); | 138 EXPECT_FALSE(range.IsValid()); |
| 140 } | 139 } |
| 141 | 140 |
| 142 } // namespace content | 141 } // namespace content |
| OLD | NEW |