Image Search: Move thumbnail JPEG encoding to the renderer.
[chromium-blink-merge.git] / net / data / proxy_resolver_v8_tracing_unittest / dns.js
blobfbfb74ec5db89402fd0dde96b5ca63085f064412
1 var g_iteration = 0;
3 function FindProxyForURL(url, host) {
4   alert('iteration: ' + g_iteration++);
6   var ips = [
7     myIpAddress(),
8     dnsResolve(''),
9     dnsResolveEx('host1'),
10     dnsResolve('host2'),
11     dnsResolve('host3'),
12     myIpAddress(),
13     dnsResolve('host3'),
14     dnsResolveEx('host1'),
15     myIpAddress(),
16     dnsResolve('host2'),
17     dnsResolveEx('host6'),
18     myIpAddressEx(),
19     dnsResolve('host1'),
20   ];
22   for (var i = 0; i < ips.length; ++i) {
23     // Stringize everything.
24     ips[i] = '' + ips[i];
25   }
27   var proxyHost = ips.join('-');
28   proxyHost = proxyHost.replace(/[^0-9a-zA-Z.-]/g, '_');
30   return "PROXY " + proxyHost + ":99";