| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 class MockRenderWidgetHost : public RenderWidgetHostImpl { | 129 class MockRenderWidgetHost : public RenderWidgetHostImpl { |
| 130 public: | 130 public: |
| 131 MockRenderWidgetHost(RenderWidgetHostDelegate* delegate, | 131 MockRenderWidgetHost(RenderWidgetHostDelegate* delegate, |
| 132 RenderProcessHost* process, | 132 RenderProcessHost* process, |
| 133 int routing_id) | 133 int routing_id) |
| 134 : RenderWidgetHostImpl( | 134 : RenderWidgetHostImpl( |
| 135 delegate, | 135 delegate, |
| 136 process, | 136 process, |
| 137 routing_id, | 137 routing_id, |
| 138 GpuSurfaceTracker::Get()->AddSurfaceForRenderer(process->GetID(), | |
| 139 routing_id), | |
| 140 false), | 138 false), |
| 141 unresponsive_timer_fired_(false), | 139 unresponsive_timer_fired_(false), |
| 142 new_content_rendering_timeout_fired_(false) { | 140 new_content_rendering_timeout_fired_(false) { |
| 143 acked_touch_event_type_ = blink::WebInputEvent::Undefined; | 141 acked_touch_event_type_ = blink::WebInputEvent::Undefined; |
| 144 } | 142 } |
| 145 | 143 |
| 146 // Allow poking at a few private members. | 144 // Allow poking at a few private members. |
| 147 using RenderWidgetHostImpl::GetResizeParams; | 145 using RenderWidgetHostImpl::GetResizeParams; |
| 148 using RenderWidgetHostImpl::OnUpdateRect; | 146 using RenderWidgetHostImpl::OnUpdateRect; |
| 149 using RenderWidgetHostImpl::RendererExited; | 147 using RenderWidgetHostImpl::RendererExited; |
| (...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1581 // Having an initial size set means that the size information had been sent | 1579 // Having an initial size set means that the size information had been sent |
| 1582 // with the reqiest to new up the RenderView and so subsequent WasResized | 1580 // with the reqiest to new up the RenderView and so subsequent WasResized |
| 1583 // calls should not result in new IPC (unless the size has actually changed). | 1581 // calls should not result in new IPC (unless the size has actually changed). |
| 1584 host_->WasResized(); | 1582 host_->WasResized(); |
| 1585 EXPECT_FALSE(process_->sink().GetUniqueMessageMatching(ViewMsg_Resize::ID)); | 1583 EXPECT_FALSE(process_->sink().GetUniqueMessageMatching(ViewMsg_Resize::ID)); |
| 1586 EXPECT_EQ(initial_size_, host_->old_resize_params_->new_size); | 1584 EXPECT_EQ(initial_size_, host_->old_resize_params_->new_size); |
| 1587 EXPECT_TRUE(host_->resize_ack_pending_); | 1585 EXPECT_TRUE(host_->resize_ack_pending_); |
| 1588 } | 1586 } |
| 1589 | 1587 |
| 1590 } // namespace content | 1588 } // namespace content |
| OLD | NEW |