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/public/test/render_view_test.h" | 5 #include "content/public/test/render_view_test.h" |
6 | 6 |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "content/common/dom_storage/dom_storage_types.h" | 8 #include "content/common/dom_storage/dom_storage_types.h" |
9 #include "content/common/frame_messages.h" | 9 #include "content/common/frame_messages.h" |
10 #include "content/common/input_messages.h" | 10 #include "content/common/input_messages.h" |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
328 mouse_event.x = bounds.CenterPoint().x(); | 328 mouse_event.x = bounds.CenterPoint().x(); |
329 mouse_event.y = bounds.CenterPoint().y(); | 329 mouse_event.y = bounds.CenterPoint().y(); |
330 mouse_event.clickCount = 1; | 330 mouse_event.clickCount = 1; |
331 scoped_ptr<IPC::Message> input_message( | 331 scoped_ptr<IPC::Message> input_message( |
332 new InputMsg_HandleInputEvent(0, &mouse_event, ui::LatencyInfo(), false)); | 332 new InputMsg_HandleInputEvent(0, &mouse_event, ui::LatencyInfo(), false)); |
333 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 333 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
334 impl->OnMessageReceived(*input_message); | 334 impl->OnMessageReceived(*input_message); |
335 return true; | 335 return true; |
336 } | 336 } |
337 | 337 |
338 void RenderViewTest::SimulateFocusChangeCompleteMessageReceived() { | |
nasko
2015/01/05 21:49:23
Is this method needed without the IPC message? Or
please use gerrit instead
2015/01/13 02:14:55
Upon further investigation (which took a bit longe
| |
339 static_cast<RenderViewImpl*>(view_)->FocusChangeComplete(); | |
340 } | |
341 | |
338 void RenderViewTest::SetFocused(const blink::WebNode& node) { | 342 void RenderViewTest::SetFocused(const blink::WebNode& node) { |
339 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 343 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
340 impl->focusedNodeChanged(node); | 344 impl->focusedNodeChanged(node); |
341 } | 345 } |
342 | 346 |
343 void RenderViewTest::Reload(const GURL& url) { | 347 void RenderViewTest::Reload(const GURL& url) { |
344 FrameMsg_Navigate_Params params; | 348 FrameMsg_Navigate_Params params; |
345 params.common_params.url = url; | 349 params.common_params.url = url; |
346 params.common_params.navigation_type = FrameMsg_Navigate_Type::RELOAD; | 350 params.common_params.navigation_type = FrameMsg_Navigate_Type::RELOAD; |
347 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 351 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
433 FrameMsg_Navigate navigate_message(impl->GetMainRenderFrame()->GetRoutingID(), | 437 FrameMsg_Navigate navigate_message(impl->GetMainRenderFrame()->GetRoutingID(), |
434 navigate_params); | 438 navigate_params); |
435 impl->GetMainRenderFrame()->OnMessageReceived(navigate_message); | 439 impl->GetMainRenderFrame()->OnMessageReceived(navigate_message); |
436 | 440 |
437 // The load actually happens asynchronously, so we pump messages to process | 441 // The load actually happens asynchronously, so we pump messages to process |
438 // the pending continuation. | 442 // the pending continuation. |
439 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); | 443 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); |
440 } | 444 } |
441 | 445 |
442 } // namespace content | 446 } // namespace content |
OLD | NEW |