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

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

Issue 1159623009: content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test build fix. Created 5 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 <cctype> 7 #include <cctype>
8 8
9 #include "base/location.h"
9 #include "base/run_loop.h" 10 #include "base/run_loop.h"
11 #include "base/single_thread_task_runner.h"
10 #include "components/scheduler/renderer/renderer_scheduler.h" 12 #include "components/scheduler/renderer/renderer_scheduler.h"
11 #include "content/common/dom_storage/dom_storage_types.h" 13 #include "content/common/dom_storage/dom_storage_types.h"
12 #include "content/common/frame_messages.h" 14 #include "content/common/frame_messages.h"
13 #include "content/common/input_messages.h" 15 #include "content/common/input_messages.h"
14 #include "content/common/view_messages.h" 16 #include "content/common/view_messages.h"
15 #include "content/public/browser/content_browser_client.h" 17 #include "content/public/browser/content_browser_client.h"
16 #include "content/public/browser/native_web_keyboard_event.h" 18 #include "content/public/browser/native_web_keyboard_event.h"
17 #include "content/public/common/content_client.h" 19 #include "content/public/common/content_client.h"
18 #include "content/public/common/renderer_preferences.h" 20 #include "content/public/common/renderer_preferences.h"
19 #include "content/public/renderer/content_renderer_client.h" 21 #include "content/public/renderer/content_renderer_client.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 } 128 }
127 129
128 RenderViewTest::RenderViewTest() 130 RenderViewTest::RenderViewTest()
129 : view_(NULL) { 131 : view_(NULL) {
130 } 132 }
131 133
132 RenderViewTest::~RenderViewTest() { 134 RenderViewTest::~RenderViewTest() {
133 } 135 }
134 136
135 void RenderViewTest::ProcessPendingMessages() { 137 void RenderViewTest::ProcessPendingMessages() {
136 msg_loop_.PostTask(FROM_HERE, base::MessageLoop::QuitClosure()); 138 msg_loop_.task_runner()->PostTask(FROM_HERE,
139 base::MessageLoop::QuitClosure());
137 msg_loop_.Run(); 140 msg_loop_.Run();
138 } 141 }
139 142
140 WebLocalFrame* RenderViewTest::GetMainFrame() { 143 WebLocalFrame* RenderViewTest::GetMainFrame() {
141 return view_->GetWebView()->mainFrame()->toWebLocalFrame(); 144 return view_->GetWebView()->mainFrame()->toWebLocalFrame();
142 } 145 }
143 146
144 void RenderViewTest::ExecuteJavaScript(const char* js) { 147 void RenderViewTest::ExecuteJavaScript(const char* js) {
145 GetMainFrame()->executeScript(WebScriptSource(WebString::fromUTF8(js))); 148 GetMainFrame()->executeScript(WebScriptSource(WebString::fromUTF8(js)));
146 } 149 }
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 550
548 impl->GetMainRenderFrame()->OnNavigate(common_params, StartNavigationParams(), 551 impl->GetMainRenderFrame()->OnNavigate(common_params, StartNavigationParams(),
549 request_params); 552 request_params);
550 553
551 // The load actually happens asynchronously, so we pump messages to process 554 // The load actually happens asynchronously, so we pump messages to process
552 // the pending continuation. 555 // the pending continuation.
553 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); 556 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait();
554 } 557 }
555 558
556 } // namespace content 559 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/mock_storage_client.cc ('k') | content/public/test/sandbox_file_system_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698