Index: net/data/proxy_resolver_v8_tracing_unittest/global_sideffects2.js |
diff --git a/net/data/proxy_resolver_v8_tracing_unittest/global_sideffects2.js b/net/data/proxy_resolver_v8_tracing_unittest/global_sideffects2.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f5e5076a7f82c227a791d2bea0f0f610af9c4a51 |
--- /dev/null |
+++ b/net/data/proxy_resolver_v8_tracing_unittest/global_sideffects2.js |
@@ -0,0 +1,18 @@ |
+var g_iteration = 0; |
+ |
+function FindProxyForURL(url, host) { |
+ g_iteration++; |
+ |
+ var ips; |
+ |
+ if (g_iteration < 3) { |
+ ips = [ |
+ dnsResolve('host1'), |
+ dnsResolve('host2') |
+ ]; |
+ } else { |
+ ips = [ dnsResolve('host' + g_iteration) ]; |
+ } |
+ |
+ return 'PROXY ' + ips.join('-') + ':100'; |
+} |