diff options
author | anantha@chromium.org <anantha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-28 19:30:08 +0000 |
---|---|---|
committer | anantha@chromium.org <anantha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-28 19:30:08 +0000 |
commit | d5b1095fcec717e36067c3c170aad7030015250e (patch) | |
tree | 8b2e5ce99a7f1cfcae576af58773cf2d6cf22e64 /chrome/test | |
parent | 5e8c6691bace726b64c76ba4fdc68c3ea0a1a325 (diff) | |
download | chromium_src-d5b1095fcec717e36067c3c170aad7030015250e.zip chromium_src-d5b1095fcec717e36067c3c170aad7030015250e.tar.gz chromium_src-d5b1095fcec717e36067c3c170aad7030015250e.tar.bz2 |
One more try to make these tests pass. Added a while loop to wait until the key is open.
Sorry for enabling and disabling the tests for few times. I really want these tests to run asap, so that I can add new tests.
Review URL: http://codereview.chromium.org/99142
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14761 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/mini_installer_test/chrome_mini_installer.cc | 15 | ||||
-rw-r--r-- | chrome/test/mini_installer_test/chrome_mini_installer.h | 3 | ||||
-rw-r--r-- | chrome/test/mini_installer_test/test.cc | 4 |
3 files changed, 19 insertions, 3 deletions
diff --git a/chrome/test/mini_installer_test/chrome_mini_installer.cc b/chrome/test/mini_installer_test/chrome_mini_installer.cc index 7f1f71e..93bdf3d 100644 --- a/chrome/test/mini_installer_test/chrome_mini_installer.cc +++ b/chrome/test/mini_installer_test/chrome_mini_installer.cc @@ -218,7 +218,7 @@ void ChromeMiniInstaller::UnInstall() { WaitUntilProcessStopsRunning( mini_installer_constants::kChromeSetupExecutable); printf("\n\nUninstall Checks:\n\n"); - ASSERT_FALSE(CheckRegistryKey(dist->GetVersionKey())); + ASSERT_FALSE(CheckRegistryKeyOnUninstall(dist->GetVersionKey())); DeleteAppFolder(); FindChromeShortcut(); CloseProcesses(mini_installer_constants::kIEExecutable); @@ -318,6 +318,19 @@ bool ChromeMiniInstaller::CheckRegistryKey(const std::wstring& key_path) { return true; } +// Checks for Chrome registry keys on uninstall. +bool ChromeMiniInstaller::CheckRegistryKeyOnUninstall( + const std::wstring& key_path) { + RegKey key; + int timer = 0; + while ((key.Open(GetRootRegistryKey(), key_path.c_str(), KEY_ALL_ACCESS)) && + (timer < 20000)) { + PlatformThread::Sleep(200); + timer = timer + 200; + } + return CheckRegistryKey(key_path); +} + // Deletes App folder after uninstall. void ChromeMiniInstaller::DeleteAppFolder() { std::wstring path = GetChromeInstallDirectoryLocation(); diff --git a/chrome/test/mini_installer_test/chrome_mini_installer.h b/chrome/test/mini_installer_test/chrome_mini_installer.h index 0167ba1..f8578bd 100644 --- a/chrome/test/mini_installer_test/chrome_mini_installer.h +++ b/chrome/test/mini_installer_test/chrome_mini_installer.h @@ -95,6 +95,9 @@ class ChromeMiniInstaller { // Checks for registry key. bool CheckRegistryKey(const std::wstring& key_path); + // Checks for registry key on uninstall. + bool CheckRegistryKeyOnUninstall(const std::wstring& key_path); + // Deletes App folder after uninstall. void DeleteAppFolder(); diff --git a/chrome/test/mini_installer_test/test.cc b/chrome/test/mini_installer_test/test.cc index 1ddb44b..d3a9745 100644 --- a/chrome/test/mini_installer_test/test.cc +++ b/chrome/test/mini_installer_test/test.cc @@ -38,7 +38,7 @@ TEST_F(MiniInstallTest, FullInstallerTest) { } // Will enable this test after bug#9593 gets fixed. -TEST_F(MiniInstallTest, DISABLED_DifferentialInstallerTest) { +TEST_F(MiniInstallTest, DifferentialInstallerTest) { ChromeMiniInstaller installer(mini_installer_constants::kUserInstall); installer.InstallDifferentialInstaller(); } @@ -48,7 +48,7 @@ TEST_F(MiniInstallTest, DISABLED_StandaloneInstallerTest) { installer.InstallStandaloneIntaller(); } -TEST_F(MiniInstallTest, MiniInstallerOverChromeMetaInstallerTest) { +TEST_F(MiniInstallTest, DISABLED_MiniInstallerOverChromeMetaInstallerTest) { ChromeMiniInstaller installer(mini_installer_constants::kUserInstall); installer.OverInstall(); } |