chromium/chrome/browser/policy/test/component_updater_policy_browsertest.cc

// Copyright 2019 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/command_line.h"
#include "base/json/json_reader.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/stringprintf.h"
#include "build/buildflag.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/component_updater/chrome_component_updater_configurator.h"
#include "chrome/browser/policy/policy_test_utils.h"
#include "components/component_updater/component_updater_service.h"
#include "components/component_updater/component_updater_switches.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/policy_constants.h"
#include "components/update_client/net/url_loader_post_interceptor.h"
#include "components/update_client/update_client.h"
#include "components/update_client/update_client_errors.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/browser_test.h"
#include "url/gurl.h"

#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/constants/ash_features.h"
#endif  // BUILDFLAG(IS_CHROMEOS_ASH)

namespace policy {

// Tests the ComponentUpdater's EnabledComponentUpdates group policy by
// calling the OnDemand interface. It uses the network interceptor to inspect
// the presence of the updatedisabled="true" attribute in the update check
// request. The update check request is expected to fail, since CUP fails.
class ComponentUpdaterPolicyTest : public PolicyTest {};

const char ComponentUpdaterPolicyTest::component_id_[] =;

ComponentUpdaterPolicyTest::ComponentUpdaterPolicyTest()
    :{}

ComponentUpdaterPolicyTest::~ComponentUpdaterPolicyTest() {}

void ComponentUpdaterPolicyTest::SetUpCommandLine(
    base::CommandLine* command_line) {}

void ComponentUpdaterPolicyTest::SetUpOnMainThread() {}

void ComponentUpdaterPolicyTest::SetEnableComponentUpdates(
    bool enable_component_updates) {}

component_updater::ComponentRegistration
ComponentUpdaterPolicyTest::MakeComponentRegistration(
    bool supports_group_policy_enable_component_updates) {}

void ComponentUpdaterPolicyTest::UpdateComponent(
    const component_updater::ComponentRegistration& reg) {}

void ComponentUpdaterPolicyTest::CallAsync(TestCaseAction action) {}

void ComponentUpdaterPolicyTest::OnDemandComplete(update_client::Error error) {}

void ComponentUpdaterPolicyTest::BeginTest() {}

void ComponentUpdaterPolicyTest::EndTest() {}

void ComponentUpdaterPolicyTest::VerifyExpectations(bool update_disabled) {}

void ComponentUpdaterPolicyTest::DefaultPolicy_GroupPolicySupported() {}

void ComponentUpdaterPolicyTest::FinishDefaultPolicy_GroupPolicySupported() {}

void ComponentUpdaterPolicyTest::DefaultPolicy_GroupPolicyNotSupported() {}

void ComponentUpdaterPolicyTest::FinishDefaultPolicy_GroupPolicyNotSupported() {}

void ComponentUpdaterPolicyTest::EnabledPolicy_GroupPolicySupported() {}

void ComponentUpdaterPolicyTest::FinishEnabledPolicy_GroupPolicySupported() {}

void ComponentUpdaterPolicyTest::EnabledPolicy_GroupPolicyNotSupported() {}

void ComponentUpdaterPolicyTest::FinishEnabledPolicy_GroupPolicyNotSupported() {}

void ComponentUpdaterPolicyTest::DisabledPolicy_GroupPolicySupported() {}

void ComponentUpdaterPolicyTest::FinishDisabled_PolicyGroupPolicySupported() {}

void ComponentUpdaterPolicyTest::DisabledPolicy_GroupPolicyNotSupported() {}

void ComponentUpdaterPolicyTest::
    FinishDisabledPolicy_GroupPolicyNotSupported() {}

IN_PROC_BROWSER_TEST_F(ComponentUpdaterPolicyTest, EnabledComponentUpdates) {}

}  // namespace policy