summaryrefslogtreecommitdiffstats
path: root/net/data/proxy_resolver_v8_tracing_unittest/global_sideffects2.js
diff options
context:
space:
mode:
Diffstat (limited to 'net/data/proxy_resolver_v8_tracing_unittest/global_sideffects2.js')
-rw-r--r--net/data/proxy_resolver_v8_tracing_unittest/global_sideffects2.js18
1 files changed, 18 insertions, 0 deletions
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 0000000..f5e5076a
--- /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';
+}