#include "build/build_config.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_switches.h"
#include "components/prefs/pref_service.h"
#include "components/proxy_config/proxy_config_dictionary.h"
#include "components/proxy_config/proxy_config_pref_names.h"
#include "content/public/test/browser_test.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/test_management_policy.h"
#include "extensions/common/extension.h"
#include "extensions/test/result_catcher.h"
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#include "chromeos/crosapi/mojom/network_settings_service.mojom.h"
#include "chromeos/crosapi/mojom/prefs.mojom-shared.h"
#include "chromeos/crosapi/mojom/prefs.mojom.h"
#include "chromeos/lacros/crosapi_pref_observer.h"
#include "chromeos/lacros/lacros_service.h"
#endif
namespace extensions {
namespace {
const char kNoServer[] = …;
const char kNoBypass[] = …;
const char kNoPac[] = …;
#if BUILDFLAG(IS_CHROMEOS_LACROS)
bool IsLacrosServiceSyncingProxyPref() {
static constexpr int kMinVersionProxyPolicy = 4;
const int version = chromeos::LacrosService::Get()
->GetInterfaceVersion<crosapi::mojom::Prefs>();
return version >= kMinVersionProxyPolicy;
}
#endif
}
class ProxySettingsApiTest : public ExtensionApiTest { … };
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyDirectSettings) { … }
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, SettingsChangeOnDisableEnable) { … }
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, SettingsRemovedOnUninstall) { … }
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest,
PRE_SettingsRemovedOnPolicyBlocklist) { … }
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, SettingsRemovedOnPolicyBlocklist) { … }
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyAutoSettings) { … }
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyPacScript) { … }
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyPacDataUrl) { … }
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyPacData) { … }
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyFixedSingle) { … }
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxySystem) { … }
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyFixedIndividual) { … }
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest,
ProxyFixedIndividualIncognitoOnly) { … }
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest,
ProxyFixedIndividualIncognitoAlso) { … }
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyFixedIndividualRemove) { … }
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest,
ProxyBypass) { … }
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyEventsInvalidProxy) { … }
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyEventsParseError) { … }
IN_PROC_BROWSER_TEST_F(ProxySettingsApiTest, ProxyEventsOtherError) { … }
}