diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-25 23:48:06 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-25 23:48:06 +0000 |
commit | 472ce96a4b839814ed93c26d35d07c78de019b17 (patch) | |
tree | 8355f2a490ce20c4be7485f40505544e3d602a26 /net/http/mock_allow_url_security_manager.h | |
parent | b597956cd427a3b830a498c69602753ce6117119 (diff) | |
download | chromium_src-472ce96a4b839814ed93c26d35d07c78de019b17.zip chromium_src-472ce96a4b839814ed93c26d35d07c78de019b17.tar.gz chromium_src-472ce96a4b839814ed93c26d35d07c78de019b17.tar.bz2 |
Clean up net unit testing code.
- Move code included from blah_unittest.h (where blah_unittest.cc has actual
unittests) into their own files, often completely out-of-lining the
definitions.
- Remove anonymous namespaces from headers.
- Reorder method declarations.
- Make other unit test link against net_test_support instead of reaching in and
including .h files in their targets directly.
BUG=68682
TEST=compiles
Review URL: http://codereview.chromium.org/6264013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72562 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/mock_allow_url_security_manager.h')
-rw-r--r-- | net/http/mock_allow_url_security_manager.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/net/http/mock_allow_url_security_manager.h b/net/http/mock_allow_url_security_manager.h new file mode 100644 index 0000000..32f572e --- /dev/null +++ b/net/http/mock_allow_url_security_manager.h @@ -0,0 +1,29 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NET_HTTP_MOCK_ALLOW_URL_SECURITY_MANAGER_H_ +#define NET_HTTP_MOCK_ALLOW_URL_SECURITY_MANAGER_H_ +#pragma once + +#include "net/http/url_security_manager.h" + +namespace net { + +// An URLSecurityManager which is very permissive and which should only be used +// in unit testing. +class MockAllowURLSecurityManager : public URLSecurityManager { + public: + MockAllowURLSecurityManager(); + virtual ~MockAllowURLSecurityManager(); + + virtual bool CanUseDefaultCredentials(const GURL& auth_origin) const; + virtual bool CanDelegate(const GURL& auth_origin) const; + + private: + DISALLOW_COPY_AND_ASSIGN(MockAllowURLSecurityManager); +}; + +} // namespace net + +#endif // NET_HTTP_MOCK_ALLOW_URL_SECURITY_MANAGER_H_ |