Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: chrome/test/mini_installer_test/chrome_mini_installer.cc

Issue 99142: One more try to make these tests pass. Added a while loop to wait until the k... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/mini_installer_test/chrome_mini_installer.h ('k') | chrome/test/mini_installer_test/test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/mini_installer_test/chrome_mini_installer.cc
===================================================================
--- chrome/test/mini_installer_test/chrome_mini_installer.cc (revision 14747)
+++ chrome/test/mini_installer_test/chrome_mini_installer.cc (working copy)
@@ -218,7 +218,7 @@
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 @@
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();
« no previous file with comments | « chrome/test/mini_installer_test/chrome_mini_installer.h ('k') | chrome/test/mini_installer_test/test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698