Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: content/public/test/render_widget_test.cc

Issue 964403003: Make it possible to set the display mode from Chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698