diff options
author | anantha@chromium.org <anantha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-06 19:43:20 +0000 |
---|---|---|
committer | anantha@chromium.org <anantha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-06 19:43:20 +0000 |
commit | d09072e7610b3dc4cb0180d57e4bbb8bae843ad5 (patch) | |
tree | 19ea6f0279f83b8d36ddf0657c5feb10783c54fb /chrome/test/mini_installer_test/test.cc | |
parent | b1f031fee7f0c43ef56e1152b79e5e806e5262bf (diff) | |
download | chromium_src-d09072e7610b3dc4cb0180d57e4bbb8bae843ad5.zip chromium_src-d09072e7610b3dc4cb0180d57e4bbb8bae843ad5.tar.gz chromium_src-d09072e7610b3dc4cb0180d57e4bbb8bae843ad5.tar.bz2 |
Added a test for testing standalone installer.
Automated the steps listed at:
https://sites.google.com/a/google.com/chrome-pmo/standalone-installers/testing-standalone-installers
Review URL: http://codereview.chromium.org/39150
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11138 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/mini_installer_test/test.cc')
-rw-r--r-- | chrome/test/mini_installer_test/test.cc | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/chrome/test/mini_installer_test/test.cc b/chrome/test/mini_installer_test/test.cc index 22b108e..7c12c7a 100644 --- a/chrome/test/mini_installer_test/test.cc +++ b/chrome/test/mini_installer_test/test.cc @@ -1,6 +1,7 @@ // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/platform_thread.h" #include "base/win_util.h" #include "chrome/installer/util/install_util.h" #include "chrome/test/mini_installer_test/mini_installer_test_constants.h" @@ -11,7 +12,7 @@ namespace { class MiniInstallTest : public testing::Test { protected: - virtual void SetUp() { + void CleanTheSystem() { ChromeMiniInstaller userinstall(mini_installer_constants::kUserInstall); userinstall.UnInstall(); if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) { @@ -20,14 +21,21 @@ class MiniInstallTest : public testing::Test { systeminstall.UnInstall(); } } + virtual void SetUp() { + CleanTheSystem(); + } virtual void TearDown() { - ChromeMiniInstaller installer(mini_installer_constants::kUserInstall); - installer.CloseProcesses(installer_util::kChromeExe); + PlatformThread::Sleep(2000); + CleanTheSystem(); } }; }; +TEST_F(MiniInstallTest, StandaloneInstallerTest) { + ChromeMiniInstaller installer(mini_installer_constants::kUserInstall); + installer.InstallStandaloneIntaller(); +} TEST_F(MiniInstallTest, MiniInstallerOverChromeMetaInstallerTest) { ChromeMiniInstaller installer(mini_installer_constants::kUserInstall); installer.OverInstall(); @@ -36,13 +44,15 @@ TEST_F(MiniInstallTest, MiniInstallerOverChromeMetaInstallerTest) { TEST_F(MiniInstallTest, MiniInstallerSystemInstallTest) { if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) { ChromeMiniInstaller installer(mini_installer_constants::kSystemInstall); - installer.InstallMiniInstaller(); + installer.InstallMiniInstaller(false, + mini_installer_constants::kChromeMiniInstallerExecutable); } } TEST_F(MiniInstallTest, MiniInstallerUserInstallTest) { ChromeMiniInstaller installer(mini_installer_constants::kUserInstall); - installer.InstallMiniInstaller(); + installer.InstallMiniInstaller(false, + mini_installer_constants::kChromeMiniInstallerExecutable); } TEST(InstallUtilTests, MiniInstallTestValidWindowsVersion) { |