| Index: chrome/browser/net/dns_master_unittest.cc
|
| ===================================================================
|
| --- chrome/browser/net/dns_master_unittest.cc (revision 35853)
|
| +++ chrome/browser/net/dns_master_unittest.cc (working copy)
|
| @@ -63,7 +63,7 @@
|
| : io_thread_(ChromeThread::IO, &loop_),
|
| host_resolver_(new net::MockCachingHostResolver()),
|
| default_max_queueing_delay_(TimeDelta::FromMilliseconds(
|
| - DnsPrefetcherInit::kMaxQueueingDelayMs)) {
|
| + DnsGlobalInit::kMaxPrefetchQueueingDelayMs)) {
|
| }
|
|
|
| protected:
|
| @@ -99,7 +99,7 @@
|
| protected:
|
| scoped_refptr<net::MockCachingHostResolver> host_resolver_;
|
|
|
| - // Shorthand to access TimeDelta of DnsPrefetcherInit::kMaxQueueingDelayMs.
|
| + // Shorthand to access TimeDelta of DnsGlobalInit::kMaxQueueingDelayMs.
|
| // (It would be a static constant... except style rules preclude that :-/ ).
|
| const TimeDelta default_max_queueing_delay_;
|
| };
|
| @@ -108,13 +108,15 @@
|
|
|
| TEST_F(DnsMasterTest, StartupShutdownTest) {
|
| scoped_refptr<DnsMaster> testing_master = new DnsMaster(host_resolver_,
|
| - default_max_queueing_delay_, DnsPrefetcherInit::kMaxConcurrentLookups);
|
| + default_max_queueing_delay_,
|
| + DnsGlobalInit::kMaxPrefetchConcurrentLookups);
|
| testing_master->Shutdown();
|
| }
|
|
|
| TEST_F(DnsMasterTest, BenefitLookupTest) {
|
| scoped_refptr<DnsMaster> testing_master = new DnsMaster(host_resolver_,
|
| - default_max_queueing_delay_, DnsPrefetcherInit::kMaxConcurrentLookups);
|
| + default_max_queueing_delay_,
|
| + DnsGlobalInit::kMaxPrefetchConcurrentLookups);
|
|
|
| std::string goog("www.google.com"),
|
| goog2("gmail.google.com.com"),
|
| @@ -178,7 +180,8 @@
|
| host_resolver_->Reset(resolver_proc);
|
|
|
| scoped_refptr<DnsMaster> testing_master = new DnsMaster(host_resolver_,
|
| - default_max_queueing_delay_, DnsPrefetcherInit::kMaxConcurrentLookups);
|
| + default_max_queueing_delay_,
|
| + DnsGlobalInit::kMaxPrefetchConcurrentLookups);
|
|
|
| std::string localhost("127.0.0.1");
|
| NameList names;
|
| @@ -201,7 +204,8 @@
|
|
|
| TEST_F(DnsMasterTest, SingleLookupTest) {
|
| scoped_refptr<DnsMaster> testing_master = new DnsMaster(host_resolver_,
|
| - default_max_queueing_delay_, DnsPrefetcherInit::kMaxConcurrentLookups);
|
| + default_max_queueing_delay_,
|
| + DnsGlobalInit::kMaxPrefetchConcurrentLookups);
|
|
|
| std::string goog("www.google.com");
|
|
|
| @@ -230,7 +234,8 @@
|
| host_resolver_->rules()->AddSimulatedFailure("*.notfound");
|
|
|
| scoped_refptr<DnsMaster> testing_master = new DnsMaster(host_resolver_,
|
| - default_max_queueing_delay_, DnsPrefetcherInit::kMaxConcurrentLookups);
|
| + default_max_queueing_delay_,
|
| + DnsGlobalInit::kMaxPrefetchConcurrentLookups);
|
|
|
| std::string goog("www.google.com"),
|
| goog2("gmail.google.com.com"),
|
| @@ -278,7 +283,8 @@
|
| host_resolver_->rules()->AddSimulatedFailure("*.notfound");
|
|
|
| scoped_refptr<DnsMaster> testing_master = new DnsMaster(host_resolver_,
|
| - default_max_queueing_delay_, DnsPrefetcherInit::kMaxConcurrentLookups);
|
| + default_max_queueing_delay_,
|
| + DnsGlobalInit::kMaxPrefetchConcurrentLookups);
|
|
|
| NameList names;
|
| for (int i = 0; i < 100; i++)
|
| @@ -382,7 +388,8 @@
|
| // Make sure nil referral lists really have no entries, and no latency listed.
|
| TEST_F(DnsMasterTest, ReferrerSerializationNilTest) {
|
| scoped_refptr<DnsMaster> master = new DnsMaster(host_resolver_,
|
| - default_max_queueing_delay_, DnsPrefetcherInit::kMaxConcurrentLookups);
|
| + default_max_queueing_delay_,
|
| + DnsGlobalInit::kMaxPrefetchConcurrentLookups);
|
| ListValue referral_list;
|
| master->SerializeReferrers(&referral_list);
|
| EXPECT_EQ(0U, referral_list.GetSize());
|
| @@ -397,7 +404,8 @@
|
| // serialization without being changed.
|
| TEST_F(DnsMasterTest, ReferrerSerializationSingleReferrerTest) {
|
| scoped_refptr<DnsMaster> master = new DnsMaster(host_resolver_,
|
| - default_max_queueing_delay_, DnsPrefetcherInit::kMaxConcurrentLookups);
|
| + default_max_queueing_delay_,
|
| + DnsGlobalInit::kMaxPrefetchConcurrentLookups);
|
| std::string motivation_hostname = "www.google.com";
|
| std::string subresource_hostname = "icons.google.com";
|
| const int kLatency = 3;
|
| @@ -421,7 +429,8 @@
|
| // Make sure the Trim() functionality works as expected.
|
| TEST_F(DnsMasterTest, ReferrerSerializationTrimTest) {
|
| scoped_refptr<DnsMaster> master = new DnsMaster(host_resolver_,
|
| - default_max_queueing_delay_, DnsPrefetcherInit::kMaxConcurrentLookups);
|
| + default_max_queueing_delay_,
|
| + DnsGlobalInit::kMaxPrefetchConcurrentLookups);
|
| std::string motivation_hostname = "www.google.com";
|
| std::string icon_subresource_hostname = "icons.google.com";
|
| std::string img_subresource_hostname = "img.google.com";
|
|
|