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

Unified Diff: chrome/browser/ui/webui/web_ui_test_handler.cc

Issue 7554008: Removal of Profile from content part 6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Profile helper function, rebase Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/tracing_ui.cc ('k') | chrome/browser/ui/webui/workers_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/web_ui_test_handler.cc
diff --git a/chrome/browser/ui/webui/web_ui_test_handler.cc b/chrome/browser/ui/webui/web_ui_test_handler.cc
index 14b407fa43b14fe7a8bdac81af2a560ec979c991..8712ad3ea47f1f13e5bba569833de8cc48c8474c 100644
--- a/chrome/browser/ui/webui/web_ui_test_handler.cc
+++ b/chrome/browser/ui/webui/web_ui_test_handler.cc
@@ -9,6 +9,7 @@
#include "chrome/common/render_messages.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/renderer_host/render_view_host.h"
+#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/notification_details.h"
#include "content/common/notification_registrar.h"
@@ -21,17 +22,17 @@ void WebUITestHandler::PreloadJavaScript(const string16& js_text,
}
void WebUITestHandler::RunJavaScript(const string16& js_text) {
- web_ui_->GetRenderViewHost()->ExecuteJavascriptInWebFrame(
+ web_ui_->tab_contents()->render_view_host()->ExecuteJavascriptInWebFrame(
string16(), js_text);
}
bool WebUITestHandler::RunJavaScriptTestWithResult(const string16& js_text) {
+ RenderViewHost* rvh = web_ui_->tab_contents()->render_view_host();
NotificationRegistrar notification_registrar;
notification_registrar.Add(
this, content::NOTIFICATION_EXECUTE_JAVASCRIPT_RESULT,
- Source<RenderViewHost>(web_ui_->GetRenderViewHost()));
- web_ui_->GetRenderViewHost()->ExecuteJavascriptInWebFrameNotifyResult(
- string16(), js_text);
+ Source<RenderViewHost>(rvh));
+ rvh->ExecuteJavascriptInWebFrameNotifyResult(string16(), js_text);
return WaitForResult();
}
« no previous file with comments | « chrome/browser/ui/webui/tracing_ui.cc ('k') | chrome/browser/ui/webui/workers_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698