diff options
author | paulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-13 17:48:33 +0000 |
---|---|---|
committer | paulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-13 17:48:33 +0000 |
commit | 4c00833c575e68573668b7bcc9cf454d1ba70021 (patch) | |
tree | 7b4adfada5cd203fb04f9bc0842365d999b3bbce /chrome/test/ui/ui_test.cc | |
parent | c78566309f95a11cd5253e1cac681038d9885f21 (diff) | |
download | chromium_src-4c00833c575e68573668b7bcc9cf454d1ba70021.zip chromium_src-4c00833c575e68573668b7bcc9cf454d1ba70021.tar.gz chromium_src-4c00833c575e68573668b7bcc9cf454d1ba70021.tar.bz2 |
Pass the test case name to the browser process in order to
simplify parsing the Purify error output from the ui_tests.
Review URL: http://codereview.chromium.org/17373
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7940 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui/ui_test.cc')
-rw-r--r-- | chrome/test/ui/ui_test.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index 4963a87..3aa709f 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -119,6 +119,17 @@ void UITest::SetUp() { L"of the app before testing."); } + // Pass the test case name to chrome.exe on the command line to help with + // parsing Purify output. + const testing::TestInfo* const test_info = + testing::UnitTest::GetInstance()->current_test_info(); + if (test_info) { + std::string test_name = test_info->test_case_name(); + test_name += "."; + test_name += test_info->name(); + ui_test_name_ = ASCIIToWide(test_name); + } + InitializeTimeouts(); LaunchBrowserAndServer(); } @@ -299,6 +310,11 @@ void UITest::LaunchBrowser(const std::wstring& arguments, bool clear_profile) { CommandLine::AppendSwitch(&command_line, switches::kDebugOnStart); #endif + if (!ui_test_name_.empty()) + CommandLine::AppendSwitchWithValue(&command_line, + switches::kTestName, + ui_test_name_); + DebugFlags::ProcessDebugFlags(&command_line, DebugFlags::UNKNOWN, false); command_line.append(L" " + arguments); |