chromium/chrome/browser/sync/test/integration/two_client_search_engines_sync_test.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/sync/test/integration/search_engines_helper.h"
#include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
#include "chrome/browser/sync/test/integration/sync_service_impl_harness.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h"
#include "chrome/test/base/search_test_utils.h"
#include "components/search_engines/search_engines_switches.h"
#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_service.h"
#include "components/signin/public/base/signin_switches.h"
#include "content/public/test/browser_test.h"

namespace {

AddSearchEngine;
AllServicesMatch;
ChangeDefaultSearchProvider;
DeleteSearchEngine;
EditSearchEngine;
GetDefaultSearchEngineKeyword;
GetServiceForBrowserContext;
GetVerifierService;
HasSearchEngine;
HasSearchEngineChecker;
SearchEnginesMatchChecker;
ServiceMatchesVerifier;
TemplateURLBuilder;

class TwoClientSearchEnginesSyncTest : public SyncTest {};

class TwoClientSearchEnginesSyncTestWithVerifier
    : public TwoClientSearchEnginesSyncTest {};

IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, E2E_ENABLED(Add)) {}

IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, E2E_ENABLED(Delete)) {}

IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest,
                       E2E_ENABLED(AddMultiple)) {}

IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTestWithVerifier, Duplicates) {}

IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest,
                       E2E_ENABLED(UpdateKeyword)) {}

IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, E2E_ENABLED(UpdateUrl)) {}

IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest,
                       E2E_ENABLED(UpdateName)) {}

IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, ConflictKeyword) {}

IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, MergeMultiple) {}

IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTestWithVerifier,
                       DisableSync) {}

IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest,
                       E2E_ENABLED(SyncDefault)) {}

// Ensure that we can change the search engine and immediately delete it
// without putting the clients out of sync.
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest,
                       E2E_ENABLED(DeleteSyncedDefault)) {}

// Same as above that forces the deletion to propagate faster than the
// preference, which is complex to deal with for the receiving client (deletion
// of the default search engine), and currently leads to search engines with
// underscores being created. This is achieved in the test by throttling
// PREFERENCES in FakeServer, which prevents the sync-ing of the default search
// engine change.
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest,
                       DeleteSyncedDefaultWithoutPrefSync) {}

}  // namespace