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

Side by Side Diff: content/renderer/render_widget_browsertest.cc

Issue 1181983005: Cleanup of unnecessary WebWidgetClient compositor methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 6 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
« no previous file with comments | « content/renderer/render_widget.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/common/view_messages.h" 5 #include "content/common/view_messages.h"
6 #include "content/public/test/render_widget_test.h" 6 #include "content/public/test/render_widget_test.h"
7 #include "content/renderer/render_widget.h" 7 #include "content/renderer/render_widget.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 20 matching lines...) Expand all
31 // Setting the bounds to a "real" rect should send the ack. 31 // Setting the bounds to a "real" rect should send the ack.
32 render_thread_->sink().ClearMessages(); 32 render_thread_->sink().ClearMessages();
33 gfx::Size size(100, 100); 33 gfx::Size size(100, 100);
34 resize_params.new_size = size; 34 resize_params.new_size = size;
35 resize_params.physical_backing_size = size; 35 resize_params.physical_backing_size = size;
36 resize_params.needs_resize_ack = true; 36 resize_params.needs_resize_ack = true;
37 OnResize(resize_params); 37 OnResize(resize_params);
38 EXPECT_EQ(resize_params.needs_resize_ack, next_paint_is_resize_ack()); 38 EXPECT_EQ(resize_params.needs_resize_ack, next_paint_is_resize_ack());
39 39
40 // Clear the flag. 40 // Clear the flag.
41 widget()->didCompleteSwapBuffers(); 41 widget()->DidCompleteSwapBuffers();
42 42
43 // Setting the same size again should not send the ack. 43 // Setting the same size again should not send the ack.
44 resize_params.needs_resize_ack = false; 44 resize_params.needs_resize_ack = false;
45 OnResize(resize_params); 45 OnResize(resize_params);
46 EXPECT_EQ(resize_params.needs_resize_ack, next_paint_is_resize_ack()); 46 EXPECT_EQ(resize_params.needs_resize_ack, next_paint_is_resize_ack());
47 47
48 // Resetting the rect to empty should not send the ack. 48 // Resetting the rect to empty should not send the ack.
49 resize_params.new_size = gfx::Size(); 49 resize_params.new_size = gfx::Size();
50 resize_params.physical_backing_size = gfx::Size(); 50 resize_params.physical_backing_size = gfx::Size();
51 OnResize(resize_params); 51 OnResize(resize_params);
(...skipping 29 matching lines...) Expand all
81 }; 81 };
82 82
83 TEST_F(RenderWidgetInitialSizeTest, InitialSize) { 83 TEST_F(RenderWidgetInitialSizeTest, InitialSize) {
84 EXPECT_EQ(initial_size_, widget()->size()); 84 EXPECT_EQ(initial_size_, widget()->size());
85 EXPECT_EQ(initial_size_, gfx::Size(widget()->webwidget()->size())); 85 EXPECT_EQ(initial_size_, gfx::Size(widget()->webwidget()->size()));
86 EXPECT_TRUE(next_paint_is_resize_ack()); 86 EXPECT_TRUE(next_paint_is_resize_ack());
87 } 87 }
88 88
89 89
90 } // namespace content 90 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698