sync_internals_util_unittest.cc 875 B

123456789101112131415161718192021222324252627282930
  1. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include <memory>
  5. #include <string>
  6. #include "base/values.h"
  7. #include "components/sync/driver/sync_internals_util.h"
  8. #include "components/sync/driver/test_sync_service.h"
  9. #include "testing/gtest/include/gtest/gtest.h"
  10. namespace syncer::sync_ui_util {
  11. namespace {
  12. TEST(SyncUIUtilTestAbout, ConstructAboutInformationWithUnrecoverableErrorTest) {
  13. TestSyncService service;
  14. service.SetDisableReasons(
  15. syncer::SyncService::DISABLE_REASON_UNRECOVERABLE_ERROR);
  16. base::Value::Dict strings = ConstructAboutInformation(
  17. IncludeSensitiveData(true), &service, std::string());
  18. EXPECT_TRUE(strings.Find("unrecoverable_error_detected"));
  19. }
  20. } // namespace
  21. } // namespace syncer::sync_ui_util