#include "base/memory/ref_counted.h"
#include "base/strings/stringprintf.h"
#include "build/build_config.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/test/browser_test.h"
#include "extensions/browser/api/socket/socket_api.h"
#include "extensions/browser/api/sockets_udp/test_udp_echo_server.h"
#include "extensions/test/extension_test_message_listener.h"
#include "extensions/test/result_catcher.h"
#include "net/dns/mock_host_resolver.h"
Extension;
ResultCatcher;
namespace {
const char kHostname[] = …;
const int kPort = …;
class SocketApiTest : public extensions::ExtensionApiTest { … };
}
IN_PROC_BROWSER_TEST_F(SocketApiTest, SocketUDPExtension) { … }
#if BUILDFLAG(IS_WIN)
#define MAYBE_SocketTCPExtension …
#else
#define MAYBE_SocketTCPExtension …
#endif
IN_PROC_BROWSER_TEST_F(SocketApiTest, MAYBE_SocketTCPExtension) { … }
IN_PROC_BROWSER_TEST_F(SocketApiTest, SocketTCPServerExtension) { … }
IN_PROC_BROWSER_TEST_F(SocketApiTest, SocketTCPServerUnbindOnUnload) { … }
#if BUILDFLAG(IS_MAC)
#define MAYBE_SocketMulticast …
#else
#define MAYBE_SocketMulticast …
#endif
IN_PROC_BROWSER_TEST_F(SocketApiTest, MAYBE_SocketMulticast) { … }