1// Copyright (c) 2013 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5var g_iteration = 0; 6 7function FindProxyForURL(url, host) { 8 g_iteration++; 9 10 var ip1 = dnsResolve("host1"); 11 var ip2 = dnsResolveEx("host2"); 12 13 if (ip1 == "182.111.0.222" && ip2 == "111.33.44.55") 14 return "PROXY foopy:" + g_iteration; 15 16 // If the script didn't terminate when abandoned, then it will reach this and 17 // hang. 18 for (;;) {} 19 throw "not reached"; 20} 21