Index: net/data/proxy_resolver_v8_tracing_unittest/error_depending_on_url.js |
diff --git a/net/data/proxy_resolver_v8_tracing_unittest/error_depending_on_url.js b/net/data/proxy_resolver_v8_tracing_unittest/error_depending_on_url.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..42256ebc66e777333848e661e4b185952fda1027 |
--- /dev/null |
+++ b/net/data/proxy_resolver_v8_tracing_unittest/error_depending_on_url.js |
@@ -0,0 +1,13 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// This proxy script throws an error if the URL does not contain the substring |
+// "DontThrowError". |
+function FindProxyForURL(url, host) { |
+ if (url.indexOf("DontThrowError") == -1) { |
+ ErrorUndefinedFunction(); |
+ return -1; |
+ } |
+ return "PROXY foopy:42"; |
+} |