#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/browser/extensions/api/proxy/proxy_api_helpers.h"
#include <memory>
#include <utility>
#include "base/values.h"
#include "chrome/browser/extensions/api/proxy/proxy_api_constants.h"
#include "components/proxy_config/proxy_config_dictionary.h"
#include "components/proxy_config/proxy_prefs.h"
#include "net/base/proxy_server.h"
#include "net/base/proxy_string_util.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace extensions {
keys;
namespace {
const char kSamplePacScript[] = …;
const char kSamplePacScriptAsDataUrl[] = …;
const char kSamplePacScriptAsDataUrl2[] = …;
const char kSamplePacScriptUrl[] = …;
base::Value::Dict CreateTestProxyServerDict(const std::string& host) { … }
base::Value::Dict CreateTestProxyServerDict(const std::string& schema,
const std::string& host,
int port) { … }
}
namespace proxy_api_helpers {
TEST(ExtensionProxyApiHelpers, CreateDataURLFromPACScript) { … }
TEST(ExtensionProxyApiHelpers, CreatePACScriptFromDataURL) { … }
TEST(ExtensionProxyApiHelpers, GetProxyModeFromExtensionPref) { … }
TEST(ExtensionProxyApiHelpers, GetPacUrlFromExtensionPref) { … }
TEST(ExtensionProxyApiHelpers, GetPacDataFromExtensionPref) { … }
TEST(ExtensionProxyApiHelpers, GetProxyRulesStringFromExtensionPref) { … }
TEST(ExtensionProxyApiHelpers, GetProxyRulesStringFromExtensionPrefInvalid) { … }
TEST(ExtensionProxyApiHelpers, GetBypassListFromExtensionPref) { … }
TEST(ExtensionProxyApiHelpers, CreateProxyConfigDict) { … }
TEST(ExtensionProxyApiHelpers, GetProxyServer) { … }
TEST(ExtensionProxyApiHelpers, JoinUrlList) { … }
TEST(ExtensionProxyApiHelpers, CreateProxyRulesDict) { … }
TEST(ExtensionProxyApiHelpers, CreateProxyRulesDictMultipleProxies) { … }
TEST(ExtensionProxyApiHelpers, CreatePacScriptDictWithUrl) { … }
TEST(ExtensionProxyApiHelpers, CreatePacScriptDictWidthData) { … }
TEST(ExtensionProxyApiHelpers, TokenizeToStringList) { … }
}
}