chromium/extensions/browser/api/test/test_api.cc

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

#include "extensions/browser/api/test/test_api.h"

#include <string>

#include "base/command_line.h"
#include "base/memory/singleton.h"
#include "content/public/common/content_switches.h"
#include "extensions/browser/api/extensions_api_client.h"
#include "extensions/browser/api/test/test_api_observer_registry.h"
#include "extensions/browser/extension_function_dispatcher.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/api/test.h"

namespace {

// If you see this error in your test, you need to set the config state
// to be returned by chrome.test.getConfig().  Do this by calling
// TestGetConfigFunction::set_test_config_state(Value* state)
// in test set up.
const char kNoTestConfigDataError[] =;

const char kNotTestProcessError[] =;

}  // namespace

namespace extensions {

Log;
NotifyFail;
PassMessage;
WaitForRoundTrip;

TestExtensionFunction::~TestExtensionFunction() = default;

bool TestExtensionFunction::PreRunValidation(std::string* error) {}

TestNotifyPassFunction::~TestNotifyPassFunction() = default;

ExtensionFunction::ResponseAction TestNotifyPassFunction::Run() {}

TestNotifyFailFunction::~TestNotifyFailFunction() = default;

ExtensionFunction::ResponseAction TestNotifyFailFunction::Run() {}

TestLogFunction::~TestLogFunction() = default;

ExtensionFunction::ResponseAction TestLogFunction::Run() {}

TestOpenFileUrlFunction::~TestOpenFileUrlFunction() = default;

ExtensionFunction::ResponseAction TestOpenFileUrlFunction::Run() {}

TestSendMessageFunction::TestSendMessageFunction() = default;

ExtensionFunction::ResponseAction TestSendMessageFunction::Run() {}

TestSendMessageFunction::~TestSendMessageFunction() = default;

void TestSendMessageFunction::Reply(const std::string& message) {}

void TestSendMessageFunction::ReplyWithError(const std::string& error) {}

TestSendScriptResultFunction::TestSendScriptResultFunction() = default;
TestSendScriptResultFunction::~TestSendScriptResultFunction() = default;

ExtensionFunction::ResponseAction TestSendScriptResultFunction::Run() {}

// static
void TestGetConfigFunction::set_test_config_state(base::Value::Dict* value) {}

TestGetConfigFunction::TestConfigState::TestConfigState()
    :{}

// static
TestGetConfigFunction::TestConfigState*
TestGetConfigFunction::TestConfigState::GetInstance() {}

TestGetConfigFunction::~TestGetConfigFunction() = default;

ExtensionFunction::ResponseAction TestGetConfigFunction::Run() {}

TestWaitForRoundTripFunction::~TestWaitForRoundTripFunction() = default;

ExtensionFunction::ResponseAction TestWaitForRoundTripFunction::Run() {}

}  // namespace extensions