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

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

Issue 2444563002: cc: Remove "SwapBuffers" naming from LayerTreeHostSingleThreadClient (Closed)
Patch Set: swapsinglethread: fix-name-in-browsertest Created 4 years, 1 month 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/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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // Setting the bounds to a "real" rect should send the ack. 50 // Setting the bounds to a "real" rect should send the ack.
51 render_thread_->sink().ClearMessages(); 51 render_thread_->sink().ClearMessages();
52 gfx::Size size(100, 100); 52 gfx::Size size(100, 100);
53 resize_params.new_size = size; 53 resize_params.new_size = size;
54 resize_params.physical_backing_size = size; 54 resize_params.physical_backing_size = size;
55 resize_params.needs_resize_ack = true; 55 resize_params.needs_resize_ack = true;
56 OnResize(resize_params); 56 OnResize(resize_params);
57 EXPECT_EQ(resize_params.needs_resize_ack, next_paint_is_resize_ack()); 57 EXPECT_EQ(resize_params.needs_resize_ack, next_paint_is_resize_ack());
58 58
59 // Clear the flag. 59 // Clear the flag.
60 widget()->DidCompleteSwapBuffers(); 60 widget()->DidReceiveCompositorFrameAck();
61 61
62 // Setting the same size again should not send the ack. 62 // Setting the same size again should not send the ack.
63 resize_params.needs_resize_ack = false; 63 resize_params.needs_resize_ack = false;
64 OnResize(resize_params); 64 OnResize(resize_params);
65 EXPECT_EQ(resize_params.needs_resize_ack, next_paint_is_resize_ack()); 65 EXPECT_EQ(resize_params.needs_resize_ack, next_paint_is_resize_ack());
66 66
67 // Resetting the rect to empty should not send the ack. 67 // Resetting the rect to empty should not send the ack.
68 resize_params.new_size = gfx::Size(); 68 resize_params.new_size = gfx::Size();
69 resize_params.physical_backing_size = gfx::Size(); 69 resize_params.physical_backing_size = gfx::Size();
70 OnResize(resize_params); 70 OnResize(resize_params);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698