| 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/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 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.top_controls_height = 0.f; | 45 resize_params.top_controls_height = 0.f; |
| 46 resize_params.top_controls_shrink_blink_size = false; | 46 resize_params.top_controls_shrink_blink_size = false; |
| 47 resize_params.resizer_rect = gfx::Rect(); | 47 resize_params.resizer_rect = gfx::Rect(); |
| 48 resize_params.is_fullscreen = false; | 48 resize_params.is_fullscreen = false; |
| 49 resize_params.display_mode = blink::WebDisplayModeBrowser; |
| 49 widget->OnResize(resize_params); | 50 widget->OnResize(resize_params); |
| 50 EXPECT_FALSE(widget->next_paint_is_resize_ack()); | 51 EXPECT_FALSE(widget->next_paint_is_resize_ack()); |
| 51 | 52 |
| 52 // Setting empty physical backing size should not send the ack. | 53 // Setting empty physical backing size should not send the ack. |
| 53 resize_params.new_size = gfx::Size(10, 10); | 54 resize_params.new_size = gfx::Size(10, 10); |
| 54 widget->OnResize(resize_params); | 55 widget->OnResize(resize_params); |
| 55 EXPECT_FALSE(widget->next_paint_is_resize_ack()); | 56 EXPECT_FALSE(widget->next_paint_is_resize_ack()); |
| 56 | 57 |
| 57 // Setting the bounds to a "real" rect should send the ack. | 58 // Setting the bounds to a "real" rect should send the ack. |
| 58 render_thread_->sink().ClearMessages(); | 59 render_thread_->sink().ClearMessages(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 82 widget->OnResize(resize_params); | 83 widget->OnResize(resize_params); |
| 83 EXPECT_FALSE(widget->next_paint_is_resize_ack()); | 84 EXPECT_FALSE(widget->next_paint_is_resize_ack()); |
| 84 | 85 |
| 85 resize_params.screen_info.orientationType = | 86 resize_params.screen_info.orientationType = |
| 86 blink::WebScreenOrientationPortraitPrimary; | 87 blink::WebScreenOrientationPortraitPrimary; |
| 87 widget->OnResize(resize_params); | 88 widget->OnResize(resize_params); |
| 88 EXPECT_FALSE(widget->next_paint_is_resize_ack()); | 89 EXPECT_FALSE(widget->next_paint_is_resize_ack()); |
| 89 } | 90 } |
| 90 | 91 |
| 91 } // namespace content | 92 } // namespace content |
| OLD | NEW |