From 20402235d708145f61c1fe41a4d7b8ddc35a15be Mon Sep 17 00:00:00 2001 From: "grt@chromium.org" Date: Thu, 14 Nov 2013 07:43:20 +0000 Subject: Use RegistryOverrideManager properly in RLZ tests. Previously, rlz/test/rlz_test_helpers.cc and chrome/browser/rlz/rlz_unittest.cc each did somewhat different things to prepare the registry for tests. Now, rlz_test_helpers.cc does the prep the right way using RegistryOverrideManager and rlz_unittests.cc uses rlz_test_helpers.cc. This unblocks the refactor in r234367 that was reverted in r234627. BUG=314800 R=rogerta@chromium.org, tommycli@chromium.org Review URL: https://codereview.chromium.org/63153009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235090 0039d316-1c4b-4281-b951-d872f2087c98 --- rlz/rlz.gyp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'rlz/rlz.gyp') diff --git a/rlz/rlz.gyp b/rlz/rlz.gyp index 18637058..bd0fe23 100644 --- a/rlz/rlz.gyp +++ b/rlz/rlz.gyp @@ -68,7 +68,6 @@ 'win/lib/process_info.h', 'win/lib/registry_util.cc', 'win/lib/registry_util.h', - 'win/lib/rlz_lib.h', 'win/lib/rlz_lib_win.cc', 'win/lib/rlz_value_store_registry.cc', 'win/lib/rlz_value_store_registry.h', @@ -111,10 +110,25 @@ 'msvs_disabled_warnings': [ 4267, ], }, { + 'target_name': 'test_support_rlz', + 'type': 'static_library', + 'dependencies': [ + ':rlz_lib', + '../base/base.gyp:base', + '../base/base.gyp:test_support_base', + '../testing/gtest.gyp:gtest', + ], + 'sources': [ + 'test/rlz_test_helpers.cc', + 'test/rlz_test_helpers.h', + ], + }, + { 'target_name': 'rlz_unittests', 'type': 'executable', 'dependencies': [ ':rlz_lib', + ':test_support_rlz', '../base/base.gyp:base', '../base/base.gyp:base_prefs', '../testing/gmock.gyp:gmock', @@ -129,8 +143,6 @@ 'lib/machine_id_unittest.cc', 'lib/rlz_lib_test.cc', 'lib/string_utils_unittest.cc', - 'test/rlz_test_helpers.cc', - 'test/rlz_test_helpers.h', 'test/rlz_unittest_main.cc', 'win/lib/machine_deal_test.cc', ], -- cgit v1.1