Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / net / data / proxy_resolver_v8_unittest / dns_fail.js
blobc71bcc38304a95d4ace32adf4f7aba6487b8f359
1 // This script should be run in an environment where all DNS resolution are
2 // failing. It tests that functions return the expected values.
3 //
4 // Returns "PROXY success:80" on success.
5 function FindProxyForURL(url, host) {
6   try {
7     expectEq("127.0.0.1", myIpAddress());
8     expectEq("", myIpAddressEx());
10     expectEq(null, dnsResolve("not-found"));
11     expectEq("", dnsResolveEx("not-found"));
13     expectEq(false, isResolvable("not-found"));
14     expectEq(false, isResolvableEx("not-found"));
16     return "PROXY success:80";
17   } catch(e) {
18     alert(e);
19     return "PROXY failed:80";
20   }
23 function expectEq(expected, actual) {
24   if (expected != actual)
25     throw "Expected " + expected + " but was " + actual;