summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorpatrick@chromium.org <patrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-27 17:54:30 +0000
committerpatrick@chromium.org <patrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-27 17:54:30 +0000
commit991f8cb1f9e13f7de29ba9fa0733d8d1b377c4d5 (patch)
treea526dcb5cd1ee2d6cecf6ab05e10b3e6b2950c42 /chrome
parent287978ecd4a288874454b38b7d4b1207b8aea339 (diff)
downloadchromium_src-991f8cb1f9e13f7de29ba9fa0733d8d1b377c4d5.zip
chromium_src-991f8cb1f9e13f7de29ba9fa0733d8d1b377c4d5.tar.gz
chromium_src-991f8cb1f9e13f7de29ba9fa0733d8d1b377c4d5.tar.bz2
Add --log-level to the list of flags accepted by UI tests.
Review URL: http://codereview.chromium.org/27264 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10614 0039d316-1c4b-4281-b951-d872f2087c98
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() {