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

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

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