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

Unified Diff: net/data/proxy_resolver_v8_unittest/dns_fail.js

Issue 333006: Add three of the six extensions to PAC that Internet Explorer supports. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: address more of wtc's comments Created 11 years, 2 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
Index: net/data/proxy_resolver_v8_unittest/dns_fail.js
===================================================================
--- net/data/proxy_resolver_v8_unittest/dns_fail.js (revision 0)
+++ net/data/proxy_resolver_v8_unittest/dns_fail.js (revision 0)
@@ -0,0 +1,27 @@
+// This script should be run in an environment where all DNS resolution are
+// failing. It tests that functions return the expected values.
+//
+// Returns "PROXY success:80" on success.
+function FindProxyForURL(url, host) {
+ try {
+ expectEq("127.0.0.1", myIpAddress());
+ expectEq("", myIpAddressEx());
+
+ expectEq(null, dnsResolve("not-found"));
+ expectEq("", dnsResolveEx("not-found"));
+
+ expectEq(false, isResolvable("not-found"));
+ expectEq(false, isResolvableEx("not-found"));
+
+ return "PROXY success:80";
+ } catch(e) {
+ alert(e);
+ return "PROXY failed:80";
+ }
+}
+
+function expectEq(expected, actual) {
+ if (expected != actual)
+ throw "Expected " + expected + " but was " + actual;
+}
+
Property changes on: net/data/proxy_resolver_v8_unittest/dns_fail.js
___________________________________________________________________
Name: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698