OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/test/render_view_test.h" | 5 #include "content/test/render_view_test.h" |
6 | 6 |
7 #include "content/common/dom_storage_common.h" | 7 #include "content/common/dom_storage_common.h" |
8 #include "content/common/view_messages.h" | 8 #include "content/common/view_messages.h" |
9 #include "content/public/browser/native_web_keyboard_event.h" | 9 #include "content/public/browser/native_web_keyboard_event.h" |
10 #include "content/public/common/renderer_preferences.h" | 10 #include "content/public/common/renderer_preferences.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 135 |
136 namespace content { | 136 namespace content { |
137 | 137 |
138 RenderViewTest::RenderViewTest() : view_(NULL) { | 138 RenderViewTest::RenderViewTest() : view_(NULL) { |
139 } | 139 } |
140 | 140 |
141 RenderViewTest::~RenderViewTest() { | 141 RenderViewTest::~RenderViewTest() { |
142 } | 142 } |
143 | 143 |
144 void RenderViewTest::ProcessPendingMessages() { | 144 void RenderViewTest::ProcessPendingMessages() { |
145 msg_loop_.PostTask(FROM_HERE, new MessageLoop::QuitTask()); | 145 msg_loop_.PostTask(FROM_HERE, MessageLoop::QuitClosure()); |
146 msg_loop_.Run(); | 146 msg_loop_.Run(); |
147 } | 147 } |
148 | 148 |
149 WebFrame* RenderViewTest::GetMainFrame() { | 149 WebFrame* RenderViewTest::GetMainFrame() { |
150 return view_->GetWebView()->mainFrame(); | 150 return view_->GetWebView()->mainFrame(); |
151 } | 151 } |
152 | 152 |
153 void RenderViewTest::ExecuteJavaScript(const char* js) { | 153 void RenderViewTest::ExecuteJavaScript(const char* js) { |
154 GetMainFrame()->executeScript(WebScriptSource(WebString::fromUTF8(js))); | 154 GetMainFrame()->executeScript(WebScriptSource(WebString::fromUTF8(js))); |
155 } | 155 } |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 486 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
487 impl->set_send_content_state_immediately(true); | 487 impl->set_send_content_state_immediately(true); |
488 } | 488 } |
489 | 489 |
490 WebKit::WebWidget* RenderViewTest::GetWebWidget() { | 490 WebKit::WebWidget* RenderViewTest::GetWebWidget() { |
491 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 491 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
492 return impl->webwidget(); | 492 return impl->webwidget(); |
493 } | 493 } |
494 | 494 |
495 } // namespace content | 495 } // namespace content |
OLD | NEW |