chromium/chrome/browser/enterprise/remote_commands/clear_browsing_data_job_unittest.cc

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

#include "chrome/browser/enterprise/remote_commands/clear_browsing_data_job.h"

#include "base/json/json_writer.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/values.h"
#include "build/build_config.h"
#include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/testing_profile_manager.h"
#include "components/nacl/browser/nacl_browser.h"
#include "components/nacl/common/buildflags.h"
#include "content/public/test/browser_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace enterprise_commands {
namespace {

const char kProfileName[] =;
const char kProfileNameLowerCase[] =;
const policy::RemoteCommandJob::UniqueIDType kUniqueID =;
const char kTestProfilePath[] =;

const char kProfilePathField[] =;
const char kClearCacheField[] =;
const char kClearCookiesField[] =;

enterprise_management::RemoteCommand CreateCommandProto(
    const std::string& profile_path,
    bool clear_cache,
    bool clear_cookies) {}

void InitJob(ClearBrowsingDataJob* job,
             const enterprise_management::RemoteCommand& command_proto) {}

std::unique_ptr<ClearBrowsingDataJob> CreateJob(
    const enterprise_management::RemoteCommand& command_proto,
    ProfileManager* profile_manager) {}

std::unique_ptr<ClearBrowsingDataJob> CreateJob(
    const enterprise_management::RemoteCommand& command_proto,
    Profile* profile) {}

}  // namespace

class ClearBrowsingDataJobTest : public ::testing::Test {};

TEST_F(ClearBrowsingDataJobTest, CanParseWithMissingDataTypes) {}

TEST_F(ClearBrowsingDataJobTest, DontInitWhenMissingProfilePath) {}

TEST_F(ClearBrowsingDataJobTest, FailureWhenProfileDoesntExist) {}

TEST_F(ClearBrowsingDataJobTest, SuccessClearCookies) {}

TEST_F(ClearBrowsingDataJobTest, SuccessClearBoth) {}

TEST_F(ClearBrowsingDataJobTest, SuccessClearCache) {}

TEST_F(ClearBrowsingDataJobTest, SuccessClearNeither) {}

TEST_F(ClearBrowsingDataJobTest, SucessClearWithProfile) {}

// For Windows machines, the path that Chrome reports for the profile is
// "Normalized" to all lower-case on the reporting server. This means that
// when the server sends the command, the path will be all lower case and
// the profile manager won't be able to use it as a key.
// Because of that, the code for this job is slightly different on Windows,
// and this test verifies that behavior.
TEST_F(ClearBrowsingDataJobTest, HandleProfilPathCaseSensitivity) {}

}  // namespace enterprise_commands