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

Unified Diff: chrome/browser/ui/webui/web_ui_browsertest.h

Issue 7861024: Adds testing infrastructure to web_ui_browsertest to support testing HtmlDialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove inline override function declaration for clang. Created 9 years, 3 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/html_dialog_ui.cc ('k') | chrome/browser/ui/webui/web_ui_browsertest.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_browsertest.h
diff --git a/chrome/browser/ui/webui/web_ui_browsertest.h b/chrome/browser/ui/webui/web_ui_browsertest.h
index 50876783ec58f35f14291ee6a767b5da6e292ee6..e1c04d11da2967877e53863353ea002be20c1bde 100644
--- a/chrome/browser/ui/webui/web_ui_browsertest.h
+++ b/chrome/browser/ui/webui/web_ui_browsertest.h
@@ -76,7 +76,7 @@ class WebUIBrowserTest
const ConstValueVector& test_arguments);
// Runs a test that may include calls to functions in test_api.js, and waits
- // for call to asyncTestDone(). Takes ownership of Value arguments.
+ // for call to testDone(). Takes ownership of Value arguments.
bool RunJavascriptAsyncTest(const std::string& test_name);
bool RunJavascriptAsyncTest(const std::string& test_name,
base::Value* arg);
@@ -125,6 +125,9 @@ class WebUIBrowserTest
// Tear down override for |kDummyURL|.
virtual void TearDownInProcessBrowserTestFixture() OVERRIDE;
+ // Set a WebUI instance to run tests on.
+ void SetWebUIInstance(WebUI* web_ui);
+
// Returns a mock WebUI object under test (if any).
virtual WebUIMessageHandler* GetMockMessageHandler();
@@ -178,6 +181,10 @@ class WebUIBrowserTest
// PreloadJavascriptLibraries().
std::string preload_test_fixture_;
std::string preload_test_name_;
+
+ // When this is non-NULL, this is The WebUI instance used for testing.
+ // Otherwise the selected tab's web_ui is used.
+ WebUI* override_selected_web_ui_;
};
#endif // CHROME_BROWSER_UI_WEBUI_WEB_UI_BROWSERTEST_H_
« no previous file with comments | « chrome/browser/ui/webui/html_dialog_ui.cc ('k') | chrome/browser/ui/webui/web_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698