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

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

Issue 7645007: WebUI Testing: async support - global mocking, deferred runs, continued run. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added ability to defer RunTest. 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
Index: chrome/browser/ui/webui/web_ui_browsertest.cc
diff --git a/chrome/browser/ui/webui/web_ui_browsertest.cc b/chrome/browser/ui/webui/web_ui_browsertest.cc
index 332b59f69ab4a434417d663cb4d8c7fd4fb4209a..7281a5d3472a093409a4e69b40fd1f91b63ec28b 100644
--- a/chrome/browser/ui/webui/web_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/web_ui_browsertest.cc
@@ -79,12 +79,17 @@ bool WebUIBrowserTest::RunJavascriptFunction(
function_name, function_arguments, false, false, NULL);
}
-bool WebUIBrowserTest::RunJavascriptTestF(const std::string& test_fixture,
+bool WebUIBrowserTest::RunJavascriptTestF(bool is_async,
+ const std::string& test_fixture,
const std::string& test_name) {
ConstValueVector args;
args.push_back(Value::CreateStringValue(test_fixture));
args.push_back(Value::CreateStringValue(test_name));
- return RunJavascriptTest("RUN_TEST_F", args);
+
+ if (is_async)
+ return RunJavascriptAsyncTest("RUN_TEST_F", args);
+ else
+ return RunJavascriptTest("RUN_TEST_F", args);
}
bool WebUIBrowserTest::RunJavascriptTest(const std::string& test_name) {

Powered by Google App Engine
This is Rietveld 408576698