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

Unified Diff: chrome/test/base/chrome_test_launcher.cc

Issue 2893703002: Cleanup PreferenceMACs on browser_tests startup (Closed)
Patch Set: fix compile Created 3 years, 7 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/base/chrome_test_launcher.h ('k') | content/public/test/test_launcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/chrome_test_launcher.cc
diff --git a/chrome/test/base/chrome_test_launcher.cc b/chrome/test/base/chrome_test_launcher.cc
index a6e39530d5e307530e1de9bd951a0a9369f1db67..10ef4ca77921c293af7ea3db6f551edeb54f4fc4 100644
--- a/chrome/test/base/chrome_test_launcher.cc
+++ b/chrome/test/base/chrome_test_launcher.cc
@@ -52,7 +52,9 @@
#endif
#if defined(OS_WIN)
+#include "base/win/registry.h"
#include "chrome/app/chrome_crash_reporter_client_win.h"
+#include "chrome/install_static/install_util.h"
#endif
ChromeTestSuiteRunner::ChromeTestSuiteRunner() {}
@@ -96,6 +98,20 @@ ChromeTestLauncherDelegate::CreateContentMainDelegate() {
return new ChromeMainDelegate();
}
+void ChromeTestLauncherDelegate::PreSharding() {
+#if defined(OS_WIN)
+ // Pre-test cleanup for registry state keyed off the profile dir (which can
+ // proliferate with the use of uniquely named scoped_dirs):
+ // https://crbug.com/721245. This needs to be here in order not to be racy
+ // with any tests that will access that state.
+ base::win::RegKey key(HKEY_CURRENT_USER,
+ install_static::GetRegistryPath().c_str(),
+ KEY_SET_VALUE | KEY_QUERY_VALUE);
+ if (key.Valid())
+ key.DeleteKey(L"PreferenceMACs");
grt (UTC plus 2) 2017/05/17 20:52:47 for devs like me who use Google Chrome and build G
gab 2017/05/17 20:57:37 Right.
+#endif
+}
+
int LaunchChromeTests(int default_jobs,
content::TestLauncherDelegate* delegate,
int argc,
« no previous file with comments | « chrome/test/base/chrome_test_launcher.h ('k') | content/public/test/test_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698