Combine RegKeyTests to prevent parallel execution.

Executing these tests in parallel causes failures due to conflicting
registry keys, combining them to unblock launching a parallel win32 bot.
Ideally these keys would be generated differently per-process and not
conflict at all (so it can be run in parallel repeatedly alongside itself).

BUG=4162
R=kjellander@webrtc.org
TBR=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/36749004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8055 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/base/win32regkey_unittest.cc b/webrtc/base/win32regkey_unittest.cc
index 1e77381..d263051 100644
--- a/webrtc/base/win32regkey_unittest.cc
+++ b/webrtc/base/win32regkey_unittest.cc
@@ -169,7 +169,7 @@
   RegKeyHelperFunctionsTest();
 }
 
-TEST(RegKeyTest, RegKeyNonStaticFunctionsTest) {
+void RegKeyNonStaticFunctionsTest() {
   DWORD int_val = 0;
   DWORD64 int64_val = 0;
   wchar_t* str_val = NULL;
@@ -359,7 +359,7 @@
   EXPECT_SUCCEEDED(RegKey::DeleteKey(kFullRkey1));
 }
 
-TEST(RegKeyTest, RegKeyStaticFunctionsTest) {
+void RegKeyStaticFunctionsTest() {
   DWORD int_val = 0;
   DWORD64 int64_val = 0;
   float float_val = 0;
@@ -587,4 +587,11 @@
   EXPECT_SUCCEEDED(RegKey::DeleteKey(kFullRkey1));
 }
 
+// Run both tests under the same test target. Because they access (read and
+// write) the same registry keys they can't run in parallel with eachother.
+TEST(RegKeyTest, RegKeyFunctionsTest) {
+  RegKeyNonStaticFunctionsTest();
+  RegKeyStaticFunctionsTest();
+}
+
 }  // namespace rtc