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

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

Issue 2082343002: Remove calls to deprecated MessageLoop methods in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cctype> 9 #include <cctype>
10 10
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 : view_(NULL) { 148 : view_(NULL) {
149 RenderFrameImpl::InstallCreateHook(&TestRenderFrame::CreateTestRenderFrame); 149 RenderFrameImpl::InstallCreateHook(&TestRenderFrame::CreateTestRenderFrame);
150 } 150 }
151 151
152 RenderViewTest::~RenderViewTest() { 152 RenderViewTest::~RenderViewTest() {
153 } 153 }
154 154
155 void RenderViewTest::ProcessPendingMessages() { 155 void RenderViewTest::ProcessPendingMessages() {
156 msg_loop_.task_runner()->PostTask(FROM_HERE, 156 msg_loop_.task_runner()->PostTask(FROM_HERE,
157 base::MessageLoop::QuitWhenIdleClosure()); 157 base::MessageLoop::QuitWhenIdleClosure());
158 msg_loop_.Run(); 158 base::RunLoop().Run();
159 } 159 }
160 160
161 WebLocalFrame* RenderViewTest::GetMainFrame() { 161 WebLocalFrame* RenderViewTest::GetMainFrame() {
162 return view_->GetWebView()->mainFrame()->toWebLocalFrame(); 162 return view_->GetWebView()->mainFrame()->toWebLocalFrame();
163 } 163 }
164 164
165 void RenderViewTest::ExecuteJavaScriptForTests(const char* js) { 165 void RenderViewTest::ExecuteJavaScriptForTests(const char* js) {
166 GetMainFrame()->executeScript(WebScriptSource(WebString::fromUTF8(js))); 166 GetMainFrame()->executeScript(WebScriptSource(WebString::fromUTF8(js)));
167 } 167 }
168 168
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); 659 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame());
660 frame->Navigate(common_params, StartNavigationParams(), request_params); 660 frame->Navigate(common_params, StartNavigationParams(), request_params);
661 661
662 // The load actually happens asynchronously, so we pump messages to process 662 // The load actually happens asynchronously, so we pump messages to process
663 // the pending continuation. 663 // the pending continuation.
664 FrameLoadWaiter(frame).Wait(); 664 FrameLoadWaiter(frame).Wait();
665 view_->GetWebView()->updateAllLifecyclePhases(); 665 view_->GetWebView()->updateAllLifecyclePhases();
666 } 666 }
667 667
668 } // namespace content 668 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698