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/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1255 aura::client::ParentWindowWithContext( | 1255 aura::client::ParentWindowWithContext( |
1256 view_->GetNativeView(), root_window, gfx::Rect(size1)); | 1256 view_->GetNativeView(), root_window, gfx::Rect(size1)); |
1257 view_->WasShown(); | 1257 view_->WasShown(); |
1258 view_->SetSize(size1); | 1258 view_->SetSize(size1); |
1259 view_->OnSwapCompositorFrame( | 1259 view_->OnSwapCompositorFrame( |
1260 0, MakeDelegatedFrame(1.f, size1, gfx::Rect(size1))); | 1260 0, MakeDelegatedFrame(1.f, size1, gfx::Rect(size1))); |
1261 ui::DrawWaiterForTest::WaitForCommit( | 1261 ui::DrawWaiterForTest::WaitForCommit( |
1262 root_window->GetHost()->compositor()); | 1262 root_window->GetHost()->compositor()); |
1263 ViewHostMsg_UpdateRect_Params update_params; | 1263 ViewHostMsg_UpdateRect_Params update_params; |
1264 update_params.view_size = size1; | 1264 update_params.view_size = size1; |
1265 update_params.scale_factor = 1.f; | |
1266 update_params.flags = ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK; | 1265 update_params.flags = ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK; |
1267 widget_host_->OnMessageReceived( | 1266 widget_host_->OnMessageReceived( |
1268 ViewHostMsg_UpdateRect(widget_host_->GetRoutingID(), update_params)); | 1267 ViewHostMsg_UpdateRect(widget_host_->GetRoutingID(), update_params)); |
1269 sink_->ClearMessages(); | 1268 sink_->ClearMessages(); |
1270 // Resize logic is idle (no pending resize, no pending commit). | 1269 // Resize logic is idle (no pending resize, no pending commit). |
1271 EXPECT_EQ(size1.ToString(), view_->GetRequestedRendererSize().ToString()); | 1270 EXPECT_EQ(size1.ToString(), view_->GetRequestedRendererSize().ToString()); |
1272 | 1271 |
1273 // Resize renderer, should produce a Resize message | 1272 // Resize renderer, should produce a Resize message |
1274 view_->SetSize(size2); | 1273 view_->SetSize(size2); |
1275 EXPECT_EQ(size2.ToString(), view_->GetRequestedRendererSize().ToString()); | 1274 EXPECT_EQ(size2.ToString(), view_->GetRequestedRendererSize().ToString()); |
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2747 EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->completed_mode()); | 2746 EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->completed_mode()); |
2748 | 2747 |
2749 SimulateGestureEvent(WebInputEvent::GestureScrollEnd, | 2748 SimulateGestureEvent(WebInputEvent::GestureScrollEnd, |
2750 blink::WebGestureDeviceTouchscreen); | 2749 blink::WebGestureDeviceTouchscreen); |
2751 EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->current_mode()); | 2750 EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->current_mode()); |
2752 EXPECT_EQ(OVERSCROLL_EAST, overscroll_delegate()->completed_mode()); | 2751 EXPECT_EQ(OVERSCROLL_EAST, overscroll_delegate()->completed_mode()); |
2753 EXPECT_EQ(3U, sink_->message_count()); | 2752 EXPECT_EQ(3U, sink_->message_count()); |
2754 } | 2753 } |
2755 | 2754 |
2756 } // namespace content | 2755 } // namespace content |
OLD | NEW |