summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/test/ui/ui_test.cc3
-rw-r--r--chrome/test/ui/ui_test.h6
-rw-r--r--chrome/test/ui/ui_test_suite.h5
3 files changed, 14 insertions, 0 deletions
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index ff30346..d7bb7ca 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -60,6 +60,7 @@ bool UITest::silent_dump_on_dcheck_ = false;
bool UITest::disable_breakpad_ = false;
int UITest::timeout_ms_ = 20 * 60 * 1000;
std::wstring UITest::js_flags_ = L"";
+std::wstring UITest::log_level_ = L"";
// Specify the time (in milliseconds) that the ui_tests should wait before
@@ -315,6 +316,8 @@ void UITest::LaunchBrowser(const CommandLine& arguments, bool clear_profile) {
if (!js_flags_.empty())
command_line.AppendSwitchWithValue(switches::kJavaScriptFlags,
js_flags_);
+ if (!log_level_.empty())
+ command_line.AppendSwitchWithValue(switches::kLoggingLevel, log_level_);
command_line.AppendSwitch(switches::kMetricsRecordingOnly);
diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h
index a0436f9..1bec6cf 100644
--- a/chrome/test/ui/ui_test.h
+++ b/chrome/test/ui/ui_test.h
@@ -292,6 +292,11 @@ class UITest : public testing::Test {
js_flags_ = value;
}
+ static std::wstring log_level() { return log_level_; }
+ static void set_log_level(const std::wstring& value) {
+ log_level_ = value;
+ }
+
// Called by some tests that wish to have a base profile to start from. This
// "user data directory" (containing one or more profiles) will be recursively
// copied into the user data directory for the test and the files will be
@@ -440,6 +445,7 @@ class UITest : public testing::Test {
static int timeout_ms_; // Timeout in milliseconds to wait
// for an test to finish.
static std::wstring js_flags_; // Flags passed to the JS engine.
+ static std::wstring log_level_; // Logging level.
#if defined(OS_WIN)
// TODO(port): restore me after AutomationProxy works.
scoped_ptr<AutomationProxy> server_;
diff --git a/chrome/test/ui/ui_test_suite.h b/chrome/test/ui/ui_test_suite.h
index 07f6c76..dfe5eeb 100644
--- a/chrome/test/ui/ui_test_suite.h
+++ b/chrome/test/ui/ui_test_suite.h
@@ -49,6 +49,11 @@ class UITestSuite : public ChromeTestSuite {
if (!js_flags.empty()) {
UITest::set_js_flags(js_flags);
}
+ std::wstring log_level =
+ parsed_command_line.GetSwitchValue(switches::kLoggingLevel);
+ if (!log_level.empty()) {
+ UITest::set_log_level(log_level);
+ }
}
virtual void SuppressErrorDialogs() {