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

Side by Side Diff: components/password_manager/sync/browser/password_manager_setting_migrator_service_unittest.cc

Issue 1903443002: [GN/iOS] Explicitly list test data in //components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-fix-jingle
Patch Set: Address comments and disable non-fonctional test Created 4 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 unified diff | Download patch
« no previous file with comments | « components/password_manager/core/browser/BUILD.gn ('k') | components/security_state/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/json/json_writer.h" 5 #include "base/json/json_writer.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/metrics/field_trial.h" 7 #include "base/metrics/field_trial.h"
8 #include "base/test/histogram_tester.h" 8 #include "base/test/histogram_tester.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 NotifyProfileAdded(); 257 NotifyProfileAdded();
258 base::HistogramTester tester; 258 base::HistogramTester tester;
259 prefs()->SetBoolean(test_case.pref_name, test_case.pref_value); 259 prefs()->SetBoolean(test_case.pref_name, test_case.pref_value);
260 ExpectValuesForBothPrefValues(test_case.expected_new_pref_value, 260 ExpectValuesForBothPrefValues(test_case.expected_new_pref_value,
261 test_case.expected_old_pref_value); 261 test_case.expected_old_pref_value);
262 EXPECT_THAT(tester.GetAllSamples(kInitialValuesHistogramName), 262 EXPECT_THAT(tester.GetAllSamples(kInitialValuesHistogramName),
263 testing::IsEmpty()); 263 testing::IsEmpty());
264 } 264 }
265 } 265 }
266 266
267 // TODO(crbug.com/604721): original CL never compiled this file with gyp and
268 // thus the test was never run on iOS and is now failing. Disabled until the
269 // bug is fixed to unblock conversion to gn.
270 #if !defined(OS_IOS)
271 #define MAYBE_ReconcileWhenWhenBothPrefsTypesArrivesFromSync \
272 ReconcileWhenWhenBothPrefsTypesArrivesFromSync
273 #else
274 #define MAYBE_ReconcileWhenWhenBothPrefsTypesArrivesFromSync \
275 DISABLED_ReconcileWhenWhenBothPrefsTypesArrivesFromSync
276 #endif
277
267 TEST_F(PasswordManagerSettingMigratorServiceTest, 278 TEST_F(PasswordManagerSettingMigratorServiceTest,
268 ReconcileWhenWhenBothPrefsTypesArrivesFromSync) { 279 MAYBE_ReconcileWhenWhenBothPrefsTypesArrivesFromSync) {
269 const struct { 280 const struct {
270 BooleanPrefState new_pref_local_value; 281 BooleanPrefState new_pref_local_value;
271 BooleanPrefState old_pref_local_value; 282 BooleanPrefState old_pref_local_value;
272 BooleanPrefState new_pref_sync_value; 283 BooleanPrefState new_pref_sync_value;
273 BooleanPrefState old_pref_sync_value; 284 BooleanPrefState old_pref_sync_value;
274 bool result_value; 285 bool result_value;
275 PasswordManagerPreferencesInitialValues histogram_initial_value; 286 PasswordManagerPreferencesInitialValues histogram_initial_value;
276 PasswordManagerPreferencesInitialAndFinalValues histogram_initial_and_final; 287 PasswordManagerPreferencesInitialAndFinalValues histogram_initial_and_final;
277 } kTestingTable[] = { 288 } kTestingTable[] = {
278 #if defined(OS_ANDROID) 289 #if defined(OS_ANDROID)
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 ASSERT_EQ(prefs()->GetBoolean(prefs::kCredentialsEnableService), true); 464 ASSERT_EQ(prefs()->GetBoolean(prefs::kCredentialsEnableService), true);
454 profile_sync_service()->SetCanSyncStart(false); 465 profile_sync_service()->SetCanSyncStart(false);
455 base::HistogramTester tester; 466 base::HistogramTester tester;
456 NotifyProfileAdded(); 467 NotifyProfileAdded();
457 ExpectValuesForBothPrefValues(true, true); 468 ExpectValuesForBothPrefValues(true, true);
458 EXPECT_THAT(tester.GetAllSamples(kInitialAndFinalValuesHistogramName), 469 EXPECT_THAT(tester.GetAllSamples(kInitialAndFinalValuesHistogramName),
459 testing::ElementsAre(base::Bucket(I11F11, 1))); 470 testing::ElementsAre(base::Bucket(I11F11, 1)));
460 } 471 }
461 472
462 } // namespace password_manager 473 } // namespace password_manager
OLDNEW
« no previous file with comments | « components/password_manager/core/browser/BUILD.gn ('k') | components/security_state/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698