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 8cf270e574cef94e3631fbfee1049c300d0b1dab..d4e03aabba7aa0e4ab592b4240a8a8ca67d6bae6 100644 |
--- a/chrome/browser/ui/webui/web_ui_test_handler.cc |
+++ b/chrome/browser/ui/webui/web_ui_test_handler.cc |
@@ -37,7 +37,8 @@ void WebUITestHandler::PreloadJavaScript(const base::string16& js_text, |
} |
void WebUITestHandler::RunJavaScript(const base::string16& js_text) { |
- web_ui()->GetWebContents()->GetMainFrame()->ExecuteJavaScript(js_text); |
+ web_ui()->GetWebContents()->GetMainFrame()->ExecuteJavaScriptForTests( |
+ js_text); |
} |
bool WebUITestHandler::RunJavaScriptTestWithResult( |
@@ -45,9 +46,9 @@ bool WebUITestHandler::RunJavaScriptTestWithResult( |
test_succeeded_ = false; |
run_test_succeeded_ = false; |
content::RenderFrameHost* frame = web_ui()->GetWebContents()->GetMainFrame(); |
- frame->ExecuteJavaScript(js_text, |
- base::Bind(&WebUITestHandler::JavaScriptComplete, |
- base::Unretained(this))); |
+ frame->ExecuteJavaScriptForTests( |
+ js_text, base::Bind(&WebUITestHandler::JavaScriptComplete, |
+ base::Unretained(this))); |
return WaitForResult(); |
} |