Lines Matching defs:host_resolver
102 MockCachingHostResolver host_resolver;
104 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, &log);
120 EXPECT_EQ(0u, host_resolver.num_resolve());
133 MockCachingHostResolver host_resolver;
135 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, &log);
149 EXPECT_EQ(0u, host_resolver.num_resolve());
179 MockCachingHostResolver host_resolver;
181 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, &log);
203 EXPECT_EQ(1u, host_resolver.num_resolve());
230 MockCachingHostResolver host_resolver;
232 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, &log);
251 EXPECT_EQ(1u, host_resolver.num_resolve());
279 MockCachingHostResolver host_resolver;
281 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, &log);
283 host_resolver.rules()->AddRuleForAddressFamily(
285 host_resolver.rules()
287 host_resolver.rules()->AddSimulatedFailure("host2");
288 host_resolver.rules()->AddRule("host3", "166.155.144.33");
289 host_resolver.rules()->AddRule("host5", "166.155.144.55");
290 host_resolver.rules()->AddSimulatedFailure("host6");
291 host_resolver.rules()->AddRuleForAddressFamily(
293 host_resolver.rules()->AddRule("*", "133.122.100.200");
311 EXPECT_EQ(7u, host_resolver.num_resolve());
356 MockCachingHostResolver host_resolver;
358 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, &log);
360 host_resolver.rules()->AddRule("foopy", "166.155.144.11");
361 host_resolver.rules()->AddRule("*", "122.133.144.155");
380 EXPECT_EQ(2u, host_resolver.num_resolve());
395 EXPECT_EQ(4u, host_resolver.num_resolve());
413 MockCachingHostResolver host_resolver;
415 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, &log);
417 host_resolver.rules()->AddRule("host1", "166.155.144.11");
418 host_resolver.rules()->AddRule("crazy4", "133.199.111.4");
419 host_resolver.rules()->AddRule("*", "122.133.144.155");
435 EXPECT_EQ(3u, host_resolver.num_resolve());
465 MockCachingHostResolver host_resolver;
467 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, &log);
469 host_resolver.rules()->AddRule("host1", "166.155.144.11");
470 host_resolver.rules()->AddRule("host2", "166.155.144.22");
471 host_resolver.rules()->AddRule("host3", "166.155.144.33");
472 host_resolver.rules()->AddRule("host4", "166.155.144.44");
473 host_resolver.rules()->AddRule("*", "122.133.144.155");
486 EXPECT_EQ(3u, host_resolver.num_resolve());
505 MockCachingHostResolver host_resolver;
507 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, &log);
509 host_resolver.rules()->AddRule("host*", "166.155.144.11");
510 host_resolver.rules()->AddRule("*", "122.133.144.155");
523 EXPECT_EQ(20u, host_resolver.num_resolve());
548 MockCachingHostResolver host_resolver;
550 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, &log);
552 host_resolver.rules()->AddRule("host*", "166.155.144.11");
553 host_resolver.rules()->AddRule("*", "122.133.144.155");
566 EXPECT_EQ(20u, host_resolver.num_resolve());
581 MockCachingHostResolver host_resolver;
582 host_resolver.set_synchronous_mode(synchronous_host_resolver);
584 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, &log);
586 host_resolver.rules()->AddRule("host1", "91.13.12.1");
587 host_resolver.rules()->AddRule("host2", "91.13.12.2");
592 EXPECT_EQ(2u, host_resolver.num_resolve());
594 host_resolver.rules()->ClearRules();
595 host_resolver.GetHostCache()->clear();
597 host_resolver.rules()->AddRule("host1", "145.88.13.3");
598 host_resolver.rules()->AddRule("host2", "137.89.8.45");
611 EXPECT_EQ(4u, host_resolver.num_resolve());
651 MockCachingHostResolver host_resolver;
653 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, NULL);
655 host_resolver.rules()->AddSimulatedFailure("*");
679 MockCachingHostResolver host_resolver;
681 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, NULL);
683 host_resolver.rules()->AddSimulatedFailure("*");
711 MockCachingHostResolver host_resolver;
713 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, NULL);
715 host_resolver.rules()->AddSimulatedFailure("*");
829 BlockableHostResolver host_resolver;
831 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, NULL);
846 host_resolver.WaitUntilRequestIsReceived();
854 host_resolver.WaitUntilRequestIsReceived();
859 EXPECT_EQ(2, host_resolver.num_cancelled_requests());
880 BlockableHostResolver host_resolver;
882 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, NULL);
895 host_resolver.SetAction(
898 host_resolver.WaitUntilRequestIsReceived();
903 EXPECT_EQ(1, host_resolver.num_cancelled_requests());
909 MockCachingHostResolver host_resolver;
911 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, NULL);
930 EXPECT_EQ(0u, host_resolver.num_resolve());
934 BlockableHostResolver host_resolver;
937 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, NULL);
944 host_resolver.WaitUntilRequestIsReceived();
947 EXPECT_EQ(1, host_resolver.num_cancelled_requests());
955 host_resolver;
957 ProxyResolverV8Tracing resolver(&host_resolver, error_observer, &log);
959 host_resolver.rules()->AddRule("host1", "182.111.0.222");
960 host_resolver.rules()->AddRule("host2", "111.33.44.55");
978 EXPECT_EQ(2u, host_resolver.num_resolve());