summaryrefslogtreecommitdiffstats
path: root/net/data/proxy_resolver_v8_unittest
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-24 02:13:57 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-24 02:13:57 +0000
commitc945a46993702cf1f876d71553691722db84aa2e (patch)
treeb7c0fede586f6c8897d800eab0bd2f259597913e /net/data/proxy_resolver_v8_unittest
parente05584f7b4af0cb193c7845402126bd3109a2d3e (diff)
downloadchromium_src-c945a46993702cf1f876d71553691722db84aa2e.zip
chromium_src-c945a46993702cf1f876d71553691722db84aa2e.tar.gz
chromium_src-c945a46993702cf1f876d71553691722db84aa2e.tar.bz2
Fix a bug where if a PAC script ended with a comment and no newline, it would fail to parse.
The library is now compiled and executed in a separate pass, rather than trying to append the source segments. BUG=http://crbug.com/22864 TEST=ProxyResolverV8Test.TrailingComment Review URL: http://codereview.chromium.org/223016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27035 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/data/proxy_resolver_v8_unittest')
-rw-r--r--net/data/proxy_resolver_v8_unittest/ends_with_comment.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/data/proxy_resolver_v8_unittest/ends_with_comment.js b/net/data/proxy_resolver_v8_unittest/ends_with_comment.js
new file mode 100644
index 0000000..7fb631f
--- /dev/null
+++ b/net/data/proxy_resolver_v8_unittest/ends_with_comment.js
@@ -0,0 +1,8 @@
+function FindProxyForURL(url, host) {
+ return "PROXY success:80";
+}
+
+// We end the script with a comment (and no trailing newline).
+// This used to cause problems, because internally ProxyResolverV8
+// would append some functions to the script; the first line of
+// those extra functions was being considered part of the comment.