diff options
author | vivianz@google.com <vivianz@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-10 17:53:46 +0000 |
---|---|---|
committer | vivianz@google.com <vivianz@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-10 17:53:46 +0000 |
commit | 6e7f9ed957e752c7065f32b4e9477da818030b71 (patch) | |
tree | d52ac464e6d6d934f91c7a374a7a275d32f75d59 /chrome/test | |
parent | b99081bfaffdbe8a44ea10cb62bfe93bfcc8d5d3 (diff) | |
download | chromium_src-6e7f9ed957e752c7065f32b4e9477da818030b71.zip chromium_src-6e7f9ed957e752c7065f32b4e9477da818030b71.tar.gz chromium_src-6e7f9ed957e752c7065f32b4e9477da818030b71.tar.bz2 |
Fixed mini-installer overinstall tests failtures.
these tests should work now for M9 and earlier and M11 builds, M10 build still does not work due to another bug (74561)
BUG=74041
Test=NONE
Review URL: http://codereview.chromium.org/6588097
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77651 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/mini_installer_test/mini_installer_test_util.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/test/mini_installer_test/mini_installer_test_util.cc b/chrome/test/mini_installer_test/mini_installer_test_util.cc index c73139d..ce7520a 100644 --- a/chrome/test/mini_installer_test/mini_installer_test_util.cc +++ b/chrome/test/mini_installer_test/mini_installer_test_util.cc @@ -10,6 +10,7 @@ #include "base/file_util.h" #include "base/path_service.h" #include "base/process_util.h" +#include "base/string_split.h" #include "base/string_util.h" #include "base/test/test_timeouts.h" #include "base/threading/platform_thread.h" @@ -208,9 +209,12 @@ bool MiniInstallerTestUtil::GetPreviousFullInstaller( if (!GetPreviousBuildNumber(diff_path, &build_no)) return false; - // Use the fifth and onward characters of the build version string - // to compose the full installer name. - std::wstring name = build_no.substr(4) + + std::vector<std::wstring> build_version; + base::SplitString(build_no, '.', &build_version); + if (build_version.size() < 4) + return false; + + std::wstring name = build_version[2] + L"." + build_version[3] + mini_installer_constants::kFullInstallerPattern + L".exe"; // Create the full installer path. |