Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Unified Diff: net/proxy/proxy_resolver_v8_unittest.cc

Issue 235001: Backport r27035.... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/proxy/proxy_resolver_v8.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_resolver_v8_unittest.cc
===================================================================
--- net/proxy/proxy_resolver_v8_unittest.cc (revision 27049)
+++ net/proxy/proxy_resolver_v8_unittest.cc (working copy)
@@ -376,6 +376,22 @@
EXPECT_EQ(2, bindings->my_ip_address_count);
}
+// Try loading a PAC script which ends with a trailing comment (no terminal
+// newline). This should not cause problems with the PAC utility functions
+// that we add to the script.
+// http://crbug.com/22864
+TEST(ProxyResolverV8Test, TrailingComment) {
+ ProxyResolverV8WithMockBindings resolver;
+ resolver.SetPacScriptFromDisk("ends_with_comment.js");
+
+ net::ProxyInfo proxy_info;
+ int result = resolver.GetProxyForURL(kQueryUrl, kPacUrl, &proxy_info);
+
+ EXPECT_EQ(net::OK, result);
+ EXPECT_FALSE(proxy_info.is_direct());
+ EXPECT_EQ("success:80", proxy_info.proxy_server().ToURI());
+}
+
TEST(ProxyResolverV8DefaultBindingsTest, DnsResolve) {
// Get a hold of a DefaultJSBindings* (it is a hidden impl class).
scoped_ptr<net::ProxyResolverV8::JSBindings> bindings(
« no previous file with comments | « net/proxy/proxy_resolver_v8.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698