[variations] Remove use of deprecated INSTANTIATE_TEST_CASE_P
The macro INSTANTIATE_TEST_CASE_P is deprecated in favor of the
new macro INSTANTIATE_TEST_SUITE_P. The code builds despite the
deprecation because there is a public dependency chain from
//components/variations:unit_tests to //third_party/jsoncpp
which adds -Wno-deprecated-declarations to cflags_cc.
$ gn desc out/Debug-iphonesimulator //components/variations:unit_tests cflags_cc --blame
...
From //third_party/jsoncpp:jsoncpp_config
(Added by //third_party/webrtc/rtc_base/BUILD.gn:677)
-Wno-deprecated-declarations
This causes the build to fail when trying to remove the dependency
of //services/network on //third_party/webrtc_overrides (which is
the only path from //components/variations to //third_party/jsoncpp).
The fix is just changing the macro invocation (as the old macro
just display a warning and delegate to the new macro).
Bug: 1258584
Change-Id: I686e2478ae0172e12951c0b7bbd1fd9de6da8913
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3217465
Auto-Submit: Sylvain Defresne <[email protected]>
Commit-Queue: Weilun Shi <[email protected]>
Reviewed-by: Weilun Shi <[email protected]>
Cr-Commit-Position: refs/heads/main@{#930202}
diff --git a/components/variations/variations_test_utils_unittest.cc b/components/variations/variations_test_utils_unittest.cc
index b717044..6e02602 100644
--- a/components/variations/variations_test_utils_unittest.cc
+++ b/components/variations/variations_test_utils_unittest.cc
@@ -67,8 +67,8 @@
signed_seed_data.study_names));
}
-INSTANTIATE_TEST_CASE_P(VariationsTestUtils,
- SignedSeedDataTest,
- ::testing::Values(kTestSeedData, kCrashingSeedData));
+INSTANTIATE_TEST_SUITE_P(VariationsTestUtils,
+ SignedSeedDataTest,
+ ::testing::Values(kTestSeedData, kCrashingSeedData));
-} // namespace variations
\ No newline at end of file
+} // namespace variations