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

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

Issue 245008: Add an additional test for dnsDomainIs() to verify that it doesn't simply mat... (Closed) Base URL: svn://chrome-svn/chrome/trunk/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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/data/proxy_resolver_v8_unittest/pac_library_unittest.js
===================================================================
--- net/data/proxy_resolver_v8_unittest/pac_library_unittest.js (revision 27049)
+++ net/data/proxy_resolver_v8_unittest/pac_library_unittest.js (working copy)
@@ -2,7 +2,7 @@
// Otherwise it will output "PROXY failure:<num-failures>".
//
// This aims to unit-test the PAC library functions, which are
-// exposed in the PAC's execution environment. (Namely, dnsDomainLevels,
+// exposed in the PAC's execution environment. (Namely, dnsDomainLevels,
// timeRange, etc.)
function FindProxyForURL(url, host) {
@@ -36,6 +36,7 @@
t.expectTrue(dnsDomainIs("google.com", ".com"));
t.expectTrue(dnsDomainIs("google.co.uk", ".co.uk"));
t.expectFalse(dnsDomainIs("google.com", ".co.uk"));
+ t.expectFalse(dnsDomainIs("www.adobe.com", ".ad"));
};
Tests.testDnsDomainLevels = function(t) {
@@ -49,7 +50,7 @@
isInNet("192.89.132.25", "192.89.132.25", "255.255.255.255"));
t.expectFalse(
isInNet("193.89.132.25", "192.89.132.25", "255.255.255.255"));
-
+
t.expectTrue(isInNet("192.89.132.25", "192.89.0.0", "255.255.0.0"));
t.expectFalse(isInNet("193.89.132.25", "192.89.0.0", "255.255.0.0"));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698