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

Side by Side Diff: content/browser/webui/web_ui_handler_browsertest.cc

Issue 6598084: Get rid of temporary render_view_host.h. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/webui/web_ui.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/browser/webui/web_ui_handler_browsertest.h" 5 #include "content/browser/webui/web_ui_handler_browsertest.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/renderer_host/render_view_host.h"
9 #include "chrome/test/ui_test_utils.h" 8 #include "chrome/test/ui_test_utils.h"
9 #include "content/browser/renderer_host/render_view_host.h"
10 10
11 bool WebUIHandlerBrowserTest::Execute(const std::string& js_test) { 11 bool WebUIHandlerBrowserTest::Execute(const std::string& js_test) {
12 web_ui_->GetRenderViewHost()->ExecuteJavascriptInWebFrame( 12 web_ui_->GetRenderViewHost()->ExecuteJavascriptInWebFrame(
13 string16(), UTF8ToUTF16(js_test)); 13 string16(), UTF8ToUTF16(js_test));
14 return WaitForResult(); 14 return WaitForResult();
15 } 15 }
16 16
17 void WebUIHandlerBrowserTest::HandlePass(const ListValue* args) { 17 void WebUIHandlerBrowserTest::HandlePass(const ListValue* args) {
18 test_succeeded_ = true; 18 test_succeeded_ = true;
19 if (is_waiting_) 19 if (is_waiting_)
(...skipping 12 matching lines...) Expand all
32 web_ui_->RegisterMessageCallback("Fail", 32 web_ui_->RegisterMessageCallback("Fail",
33 NewCallback(this, &WebUIHandlerBrowserTest::HandleFail)); 33 NewCallback(this, &WebUIHandlerBrowserTest::HandleFail));
34 } 34 }
35 35
36 bool WebUIHandlerBrowserTest::WaitForResult() { 36 bool WebUIHandlerBrowserTest::WaitForResult() {
37 is_waiting_ = true; 37 is_waiting_ = true;
38 ui_test_utils::RunMessageLoop(); 38 ui_test_utils::RunMessageLoop();
39 is_waiting_ = false; 39 is_waiting_ = false;
40 return test_succeeded_; 40 return test_succeeded_;
41 } 41 }
OLDNEW
« no previous file with comments | « content/browser/webui/web_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698