summaryrefslogtreecommitdiffstats
path: root/net/data
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-23 18:04:01 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-23 18:04:01 +0000
commit0238de41ca1bdce286ac08d21c7634c36787ad7f (patch)
treefbdbdd2d5e0b3bfb4be2b6cd0e48d2ceaf8d1aa7 /net/data
parentf2bd5397e9dbc5954aa78eef1ae9fed0f599650f (diff)
downloadchromium_src-0238de41ca1bdce286ac08d21c7634c36787ad7f.zip
chromium_src-0238de41ca1bdce286ac08d21c7634c36787ad7f.tar.gz
chromium_src-0238de41ca1bdce286ac08d21c7634c36787ad7f.tar.bz2
Add support for international domain names in PAC scripts. This converts non-ASCII hostnames in dnsResolve() and dnsResolveEx() to punycode.
BUG=47234 TEST=ProxyResolverV8Test.DNSResolutionOfInternationDomainName Review URL: http://codereview.chromium.org/2842017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50624 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/data')
-rwxr-xr-xnet/data/proxy_resolver_v8_unittest/international_domain_names.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/data/proxy_resolver_v8_unittest/international_domain_names.js b/net/data/proxy_resolver_v8_unittest/international_domain_names.js
new file mode 100755
index 0000000..546af13
--- /dev/null
+++ b/net/data/proxy_resolver_v8_unittest/international_domain_names.js
@@ -0,0 +1,16 @@
+// Try resolving hostnames containing non-ASCII characters.
+
+function FindProxyForURL(url, host) {
+ // This international hostname has a non-ASCII character. It is represented
+ // in punycode as 'xn--bcher-kva.ch'
+ var idn = 'B\u00fccher.ch';
+
+ // We disregard the actual return value -- all we care about is that on
+ // the C++ end the bindings were passed the punycode equivalent of this
+ // unicode hostname.
+ dnsResolve(idn);
+ dnsResolveEx(idn);
+
+ return "DIRECT";
+}
+