summaryrefslogtreecommitdiffstats
path: root/net/test/test_server.cc
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-10 14:43:00 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-10 14:43:00 +0000
commitbfba36542e138194af9305cef85a00ffb9f4c548 (patch)
tree49714cf8afbdaeb12ac463a2328bdcd79601be0b /net/test/test_server.cc
parent735844ac9b440410b101127907090c17d3672852 (diff)
downloadchromium_src-bfba36542e138194af9305cef85a00ffb9f4c548.zip
chromium_src-bfba36542e138194af9305cef85a00ffb9f4c548.tar.gz
chromium_src-bfba36542e138194af9305cef85a00ffb9f4c548.tar.bz2
Explicitly whitelist the test server port.
BUG=65859 TEST=yes please Review URL: http://codereview.chromium.org/5519015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68853 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/test/test_server.cc')
-rw-r--r--net/test/test_server.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/test/test_server.cc b/net/test/test_server.cc
index d2d3fde..a6e5a82 100644
--- a/net/test/test_server.cc
+++ b/net/test/test_server.cc
@@ -159,6 +159,8 @@ bool TestServer::Start() {
return false;
}
+ allowed_port_.reset(new ScopedPortException(host_port_pair_.port()));
+
started_ = true;
return true;
}
@@ -181,6 +183,8 @@ bool TestServer::Stop() {
VLOG(1) << "Kill failed?";
}
+ allowed_port_.reset();
+
return ret;
}