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

Side by Side Diff: content/public/test/render_view_test.cc

Issue 14335017: content: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/public/test/render_view_test.h ('k') | content/public/test/test_browser_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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/input_messages.h" 8 #include "content/common/input_messages.h"
9 #include "content/common/view_messages.h" 9 #include "content/common/view_messages.h"
10 #include "content/public/browser/native_web_keyboard_event.h" 10 #include "content/public/browser/native_web_keyboard_event.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 71
72 RenderViewTest::RenderViewTest() 72 RenderViewTest::RenderViewTest()
73 : view_(NULL) { 73 : view_(NULL) {
74 } 74 }
75 75
76 RenderViewTest::~RenderViewTest() { 76 RenderViewTest::~RenderViewTest() {
77 } 77 }
78 78
79 void RenderViewTest::ProcessPendingMessages() { 79 void RenderViewTest::ProcessPendingMessages() {
80 msg_loop_.PostTask(FROM_HERE, MessageLoop::QuitClosure()); 80 msg_loop_.PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
81 msg_loop_.Run(); 81 msg_loop_.Run();
82 } 82 }
83 83
84 WebFrame* RenderViewTest::GetMainFrame() { 84 WebFrame* RenderViewTest::GetMainFrame() {
85 return view_->GetWebView()->mainFrame(); 85 return view_->GetWebView()->mainFrame();
86 } 86 }
87 87
88 void RenderViewTest::ExecuteJavaScript(const char* js) { 88 void RenderViewTest::ExecuteJavaScript(const char* js) {
89 GetMainFrame()->executeScript(WebScriptSource(WebString::fromUTF8(js))); 89 GetMainFrame()->executeScript(WebScriptSource(WebString::fromUTF8(js)));
90 } 90 }
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 362
363 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); 363 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params);
364 OnMessageReceived(navigate_message); 364 OnMessageReceived(navigate_message);
365 365
366 // The load actually happens asynchronously, so we pump messages to process 366 // The load actually happens asynchronously, so we pump messages to process
367 // the pending continuation. 367 // the pending continuation.
368 ProcessPendingMessages(); 368 ProcessPendingMessages();
369 } 369 }
370 370
371 } // namespace content 371 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/render_view_test.h ('k') | content/public/test/test_browser_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698