chromium/chrome/browser/sync/test/integration/two_client_extensions_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 "build/build_config.h"
#include "chrome/browser/extensions/scoped_test_mv2_enabler.h"
#include "chrome/browser/sync/test/integration/extensions_helper.h"
#include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "content/public/test/browser_test.h"

namespace {

AllProfilesHaveSameExtensions;
DisableExtension;
EnableExtension;
GetInstalledExtensions;
HasSameExtensions;
IncognitoDisableExtension;
IncognitoEnableExtension;
InstallExtension;
UninstallExtension;

class TwoClientExtensionsSyncTest : public SyncTest {};

IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
                       E2E_ENABLED(StartWithNoExtensions)) {}

// Flaky on Mac: http://crbug.com/535996
#if BUILDFLAG(IS_MAC)
#define MAYBE_StartWithSameExtensions
#else
#define MAYBE_StartWithSameExtensions
#endif
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
                       E2E_ENABLED(MAYBE_StartWithSameExtensions)) {}

// Flaky on Mac: http://crbug.com/535996
#if BUILDFLAG(IS_MAC)
#define MAYBE_StartWithDifferentExtensions
#else
#define MAYBE_StartWithDifferentExtensions
#endif
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
                       E2E_ENABLED(MAYBE_StartWithDifferentExtensions)) {}

IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
                       E2E_ENABLED(InstallDifferentExtensions)) {}

IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest, E2E_ENABLED(Add)) {}

IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest, E2E_ENABLED(Uninstall)) {}

IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
                       E2E_ENABLED(UpdateEnableDisableExtension)) {}

IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
                       E2E_ENABLED(UpdateIncognitoEnableDisable)) {}

// Regression test for bug 104399: ensure that an extension installed prior to
// setting up sync, when uninstalled, is also uninstalled from sync.
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
                       E2E_ENABLED(UninstallPreinstalledExtensions)) {}

// TODO(akalin): Add tests exercising:
//   - Offline installation/uninstallation behavior

}  // namespace