From 44eed9ff188a565ebd56d6e1084921eaae4af98d Mon Sep 17 00:00:00 2001 From: "nirnimesh@chromium.org" Date: Mon, 28 Jun 2010 22:04:00 +0000 Subject: PyAuto: Collect branding info as a part of GetBrowserInfo() Also, use command_line_string() from base/command_line.h which is cross-platform now. Review URL: http://codereview.chromium.org/2800029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51055 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/automation/automation_provider.cc | 13 +++++++++---- chrome/test/pyautolib/pyauto.py | 3 ++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 621c80c..df2cf14 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -1641,13 +1641,18 @@ void AutomationProvider::GetBrowserInfo(Browser* browser, chrome::kBrowserProcessExecutablePath); properties->SetString(L"HelperProcessExecutablePath", chrome::kHelperProcessExecutablePath); -#if defined(OS_WIN) properties->SetString(L"command_line_string", CommandLine::ForCurrentProcess()->command_line_string()); -#elif defined(OS_POSIX) - properties->SetString(L"command_line_string", - JoinString(CommandLine::ForCurrentProcess()->argv(), ' ')); + + std::string branding; +#if defined(GOOGLE_CHROME_BUILD) + branding = "Google Chrome"; +#elif defined(CHROMIUM_BUILD) + branding = "Chromium"; +#else + branding = "Unknown Branding"; #endif + properties->SetString(L"branding", branding); scoped_ptr return_value(new DictionaryValue); return_value->Set(L"properties", properties); diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py index 72cd720..661b7c3 100644 --- a/chrome/test/pyautolib/pyauto.py +++ b/chrome/test/pyautolib/pyauto.py @@ -497,7 +497,8 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase): u'HelperProcessExecutableName': u'Chromium Helper', u'HelperProcessExecutablePath': u'Chromium Helper.app/Contents/' 'MacOS/Chromium Helper', - u'command_line_string': "COMMAND_LINE_STRING --WITH-FLAGS"}, + u'command_line_string': "COMMAND_LINE_STRING --WITH-FLAGS", + u'branding': 'Chromium',} # The order of the windows and tabs listed here will be the same as # what shows up on screen. u'windows': [ { u'index': 0, -- cgit v1.1