//------------------------------------------------------------------------------
TEST_F(PredictorTest, StartupShutdownTest) {
- Predictor testing_master(true);
+ Predictor testing_master(true, true);
testing_master.Shutdown();
}
TEST_F(PredictorTest, ShutdownWhenResolutionIsPendingTest) {
scoped_ptr<net::HostResolver> host_resolver(new net::HangingHostResolver());
- Predictor testing_master(true);
+ Predictor testing_master(true, true);
testing_master.SetHostResolver(host_resolver.get());
GURL localhost("http://localhost:80");
}
TEST_F(PredictorTest, SingleLookupTest) {
- Predictor testing_master(true);
+ Predictor testing_master(true, true);
testing_master.SetHostResolver(host_resolver_.get());
GURL goog("http://www.google.com:80");
TEST_F(PredictorTest, ConcurrentLookupTest) {
host_resolver_->rules()->AddSimulatedFailure("*.notfound");
- Predictor testing_master(true);
+ Predictor testing_master(true, true);
testing_master.SetHostResolver(host_resolver_.get());
GURL goog("http://www.google.com:80"),
TEST_F(PredictorTest, MassiveConcurrentLookupTest) {
host_resolver_->rules()->AddSimulatedFailure("*.notfound");
- Predictor testing_master(true);
+ Predictor testing_master(true, true);
testing_master.SetHostResolver(host_resolver_.get());
UrlList names;
// Make sure nil referral lists really have no entries, and no latency listed.
TEST_F(PredictorTest, ReferrerSerializationNilTest) {
- Predictor predictor(true);
+ Predictor predictor(true, true);
predictor.SetHostResolver(host_resolver_.get());
scoped_ptr<base::ListValue> referral_list(NewEmptySerializationList());
// deserialized into the database, and can be extracted back out via
// serialization without being changed.
TEST_F(PredictorTest, ReferrerSerializationSingleReferrerTest) {
- Predictor predictor(true);
+ Predictor predictor(true, true);
predictor.SetHostResolver(host_resolver_.get());
const GURL motivation_url("http://www.google.com:91");
const GURL subresource_url("http://icons.google.com:90");
// domains for referring URL, and that it sorts the results in the
// correct order.
TEST_F(PredictorTest, GetHtmlReferrerLists) {
- Predictor predictor(true);
+ Predictor predictor(true, true);
predictor.SetHostResolver(host_resolver_.get());
const double kUseRate = 23.4;
scoped_ptr<base::ListValue> referral_list(NewEmptySerializationList());
// Make sure the Trim() functionality works as expected.
TEST_F(PredictorTest, ReferrerSerializationTrimTest) {
- Predictor predictor(true);
+ Predictor predictor(true, true);
predictor.SetHostResolver(host_resolver_.get());
GURL motivation_url("http://www.google.com:110");
}
TEST_F(PredictorTest, DiscardPredictorResults) {
- Predictor predictor(true);
+ SimplePredictor predictor(true, true);
predictor.SetHostResolver(host_resolver_.get());
base::ListValue referral_list;
predictor.SerializeReferrers(&referral_list);
net::TransportSecurityState state;
state.AddHSTS(kHttpUrl.host(), expiry, false);
- Predictor predictor(true);
+ Predictor predictor(true, true);
TestPredictorObserver observer;
predictor.SetObserver(&observer);
predictor.SetTransportSecurityState(&state);
net::TransportSecurityState state;
state.AddHSTS(kHttpUrl.host(), expiry, false);
- Predictor predictor(true);
+ SimplePredictor predictor(true, true);
TestPredictorObserver observer;
predictor.SetObserver(&observer);
predictor.SetTransportSecurityState(&state);
};
TEST_F(PredictorTest, SingleLookupTestWithDisabledAdvisor) {
- Predictor testing_master(true);
+ Predictor testing_master(true, true);
TestProxyAdvisor* advisor = new TestProxyAdvisor();
testing_master.SetHostResolver(host_resolver_.get());
testing_master.proxy_advisor_.reset(advisor);
}
TEST_F(PredictorTest, SingleLookupTestWithEnabledAdvisor) {
- Predictor testing_master(true);
+ Predictor testing_master(true, true);
testing_master.SetHostResolver(host_resolver_.get());
TestProxyAdvisor* advisor = new TestProxyAdvisor();
testing_master.proxy_advisor_.reset(advisor);
}
TEST_F(PredictorTest, TestSimplePreconnectAdvisor) {
- Predictor testing_master(true);
+ Predictor testing_master(true, true);
testing_master.SetHostResolver(host_resolver_.get());
TestProxyAdvisor* advisor = new TestProxyAdvisor();
testing_master.proxy_advisor_.reset(advisor);