Chromium Code Reviews| Index: net/data/proxy_resolver_v8_unittest/exception_findproxyforurl_during_resolve.js |
| diff --git a/net/data/proxy_resolver_v8_unittest/exception_findproxyforurl_during_resolve.js b/net/data/proxy_resolver_v8_unittest/exception_findproxyforurl_during_resolve.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..965a79fa152e9dcae1603379f3629467811ed407 |
| --- /dev/null |
| +++ b/net/data/proxy_resolver_v8_unittest/exception_findproxyforurl_during_resolve.js |
| @@ -0,0 +1,17 @@ |
| +// This PAC script will throw an exception when accessing the "FindProxyForURL" |
| +// the *second* time it is accessed. |
| + |
| +function actualFindProxyForURL(url, host) { |
| + return "DIRECT"; |
| +} |
| + |
| +var counter = 2; |
| + |
| +function FindProxyForURLGetter() { |
|
mmenke
2015/02/20 22:15:05
nit: f should be lowercase, I believe.
|
| + counter--; |
| + if (counter <= 0) |
| + throw "crash!"; |
| + return actualFindProxyForURL; |
| +} |
| + |
| +Object.defineProperty(this, "FindProxyForURL", {get: FindProxyForURLGetter}); |