This source file includes following definitions.
- TEST
#include "net/proxy/proxy_info.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
namespace {
TEST(ProxyInfoTest, ProxyInfoIsDirectOnly) {
ProxyInfo info;
EXPECT_FALSE(info.is_direct_only());
info.UseDirect();
EXPECT_TRUE(info.is_direct_only());
info.UsePacString("DIRECT");
EXPECT_TRUE(info.is_direct_only());
info.UsePacString("PROXY myproxy:80");
EXPECT_FALSE(info.is_direct_only());
info.UsePacString("DIRECT; PROXY myproxy:80");
EXPECT_TRUE(info.is_direct());
EXPECT_FALSE(info.is_direct_only());
info.UsePacString("PROXY myproxy:80; DIRECT");
EXPECT_FALSE(info.is_direct());
EXPECT_FALSE(info.is_direct_only());
EXPECT_TRUE(info.Fallback(BoundNetLog()));
EXPECT_TRUE(info.is_direct());
EXPECT_FALSE(info.is_direct_only());
}
}
}