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

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

Issue 1398153002: Don't use base::MessageLoop::{Quit,QuitClosure} in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « content/public/test/javascript_test_observer.cc ('k') | content/public/test/test_utils.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 <cctype> 7 #include <cctype>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 RenderViewTest::RenderViewTest() 128 RenderViewTest::RenderViewTest()
129 : view_(NULL) { 129 : view_(NULL) {
130 RenderFrameImpl::InstallCreateHook(&TestRenderFrame::CreateTestRenderFrame); 130 RenderFrameImpl::InstallCreateHook(&TestRenderFrame::CreateTestRenderFrame);
131 } 131 }
132 132
133 RenderViewTest::~RenderViewTest() { 133 RenderViewTest::~RenderViewTest() {
134 } 134 }
135 135
136 void RenderViewTest::ProcessPendingMessages() { 136 void RenderViewTest::ProcessPendingMessages() {
137 msg_loop_.task_runner()->PostTask(FROM_HERE, 137 msg_loop_.task_runner()->PostTask(FROM_HERE,
138 base::MessageLoop::QuitClosure()); 138 base::MessageLoop::QuitWhenIdleClosure());
139 msg_loop_.Run(); 139 msg_loop_.Run();
140 } 140 }
141 141
142 WebLocalFrame* RenderViewTest::GetMainFrame() { 142 WebLocalFrame* RenderViewTest::GetMainFrame() {
143 return view_->GetWebView()->mainFrame()->toWebLocalFrame(); 143 return view_->GetWebView()->mainFrame()->toWebLocalFrame();
144 } 144 }
145 145
146 void RenderViewTest::ExecuteJavaScriptForTests(const char* js) { 146 void RenderViewTest::ExecuteJavaScriptForTests(const char* js) {
147 GetMainFrame()->executeScript(WebScriptSource(WebString::fromUTF8(js))); 147 GetMainFrame()->executeScript(WebScriptSource(WebString::fromUTF8(js)));
148 } 148 }
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 TestRenderFrame* frame = 589 TestRenderFrame* frame =
590 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); 590 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame());
591 frame->Navigate(common_params, StartNavigationParams(), request_params); 591 frame->Navigate(common_params, StartNavigationParams(), request_params);
592 592
593 // The load actually happens asynchronously, so we pump messages to process 593 // The load actually happens asynchronously, so we pump messages to process
594 // the pending continuation. 594 // the pending continuation.
595 FrameLoadWaiter(frame).Wait(); 595 FrameLoadWaiter(frame).Wait();
596 } 596 }
597 597
598 } // namespace content 598 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/javascript_test_observer.cc ('k') | content/public/test/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698