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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Issue 284413002: Fix virtual keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review nits Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/compositor/delegated_frame_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
index fc2ee89021e815184a7be8689ba53ada02a8b90d..09b7893a363c5b9967f1468e2f7a8de088878ffb 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -169,9 +169,7 @@ class FakeRenderWidgetHostViewAura : public RenderWidgetHostViewAura {
}
virtual bool ShouldCreateResizeLock() OVERRIDE {
- gfx::Size desired_size = window()->bounds().size();
- return desired_size !=
- GetDelegatedFrameHost()->CurrentFrameSizeInDIPForTesting();
+ return GetDelegatedFrameHost()->ShouldCreateResizeLockForTesting();
}
virtual void RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request)
@@ -988,7 +986,6 @@ TEST_F(RenderWidgetHostViewAuraTest, SkippedDelegatedFrames) {
// Lock the compositor. Now we should drop frames.
view_rect = gfx::Rect(150, 150);
view_->SetSize(view_rect.size());
- view_->GetDelegatedFrameHost()->MaybeCreateResizeLock();
// This frame is dropped.
gfx::Rect dropped_damage_rect_1(10, 20, 30, 40);
@@ -1025,6 +1022,21 @@ TEST_F(RenderWidgetHostViewAuraTest, SkippedDelegatedFrames) {
view_->RunOnCompositingDidCommit();
+ // Resize to something empty.
+ view_rect = gfx::Rect(100, 0);
+ view_->SetSize(view_rect.size());
+
+ // We're never expecting empty frames, resize to something non-empty.
+ view_rect = gfx::Rect(100, 100);
+ view_->SetSize(view_rect.size());
+
+ // This frame should not be dropped.
+ EXPECT_CALL(observer, OnWindowPaintScheduled(view_->window_, view_rect));
+ view_->OnSwapCompositorFrame(
+ 0, MakeDelegatedFrame(1.f, view_rect.size(), view_rect));
+ testing::Mock::VerifyAndClearExpectations(&observer);
+ view_->RunOnCompositingDidCommit();
+
view_->window_->RemoveObserver(&observer);
}
« no previous file with comments | « content/browser/compositor/delegated_frame_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698