summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 21:49:03 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 21:49:03 +0000
commit8822f38cd5d5006033003e5197a56bed2cc33fea (patch)
tree2d239e6b8b1557b1e90c5747b63c56238b2fb846 /net
parentc9b9f10acf2d9e8290739b10bfaf18da4ea9656c (diff)
downloadchromium_src-8822f38cd5d5006033003e5197a56bed2cc33fea.zip
chromium_src-8822f38cd5d5006033003e5197a56bed2cc33fea.tar.gz
chromium_src-8822f38cd5d5006033003e5197a56bed2cc33fea.tar.bz2
More FRIEND_TEST_ALL_PREFIXES.
TEST=none BUG=44549 Review URL: http://codereview.chromium.org/3053024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54388 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/base/cookie_monster.h8
-rw-r--r--net/base/filter.h4
-rw-r--r--net/base/host_cache.h6
-rw-r--r--net/base/sdch_manager.h4
-rw-r--r--net/base/transport_security_state.h4
-rw-r--r--net/base/upload_data.h7
-rw-r--r--net/base/x509_certificate.h6
-rw-r--r--net/disk_cache/block_files.h8
-rw-r--r--net/http/http_auth_cache.h7
-rw-r--r--net/http/http_auth_handler_digest.h10
-rw-r--r--net/http/http_network_transaction.h4
-rw-r--r--net/proxy/proxy_config_service_win.h4
-rw-r--r--net/proxy/proxy_script_fetcher.h6
-rw-r--r--net/proxy/proxy_service.h6
-rw-r--r--net/socket/socks_client_socket.h8
-rw-r--r--net/spdy/spdy_framer.h6
-rw-r--r--net/spdy/spdy_network_transaction.h5
-rw-r--r--net/spdy/spdy_session.h4
-rw-r--r--net/spdy/spdy_session_pool.h4
19 files changed, 56 insertions, 55 deletions
diff --git a/net/base/cookie_monster.h b/net/base/cookie_monster.h
index ab479c4..8172857 100644
--- a/net/base/cookie_monster.h
+++ b/net/base/cookie_monster.h
@@ -14,13 +14,13 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/histogram.h"
#include "base/lock.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "base/time.h"
#include "net/base/cookie_store.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class GURL;
@@ -158,8 +158,10 @@ class CookieMonster : public CookieStore {
// Testing support.
friend class CookieMonsterTest;
- FRIEND_TEST(CookieMonsterTest, TestCookieDeleteAllCreatedAfterTimestamp);
- FRIEND_TEST(CookieMonsterTest, TestCookieDeleteAllCreatedBetweenTimestamps);
+ FRIEND_TEST_ALL_PREFIXES(CookieMonsterTest,
+ TestCookieDeleteAllCreatedAfterTimestamp);
+ FRIEND_TEST_ALL_PREFIXES(CookieMonsterTest,
+ TestCookieDeleteAllCreatedBetweenTimestamps);
bool SetCookieWithCreationTime(const GURL& url,
const std::string& cookie_line,
const base::Time& creation_time);
diff --git a/net/base/filter.h b/net/base/filter.h
index db0ef9d..d00a351 100644
--- a/net/base/filter.h
+++ b/net/base/filter.h
@@ -34,10 +34,10 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "base/time.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class GURL;
@@ -201,7 +201,7 @@ class Filter {
protected:
explicit Filter(const FilterContext& filter_context);
- FRIEND_TEST(SdchFilterTest, ContentTypeId);
+ FRIEND_TEST_ALL_PREFIXES(SdchFilterTest, ContentTypeId);
// Filters the data stored in stream_buffer_ and writes the output into the
// dest_buffer passed in.
//
diff --git a/net/base/host_cache.h b/net/base/host_cache.h
index 81e4cd7..aedc499 100644
--- a/net/base/host_cache.h
+++ b/net/base/host_cache.h
@@ -9,12 +9,12 @@
#include <map>
#include <string>
+#include "base/gtest_prod_util.h"
#include "base/non_thread_safe.h"
#include "base/ref_counted.h"
#include "base/time.h"
#include "net/base/address_family.h"
#include "net/base/address_list.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
namespace net {
@@ -111,8 +111,8 @@ class HostCache : public NonThreadSafe {
const EntryMap& entries() const;
private:
- FRIEND_TEST(HostCacheTest, Compact);
- FRIEND_TEST(HostCacheTest, NoCache);
+ FRIEND_TEST_ALL_PREFIXES(HostCacheTest, Compact);
+ FRIEND_TEST_ALL_PREFIXES(HostCacheTest, NoCache);
// Returns true if this cache entry's result is valid at time |now|.
static bool CanUseEntry(const Entry* entry, const base::TimeTicks now);
diff --git a/net/base/sdch_manager.h b/net/base/sdch_manager.h
index 74e38ca..4dd43ae 100644
--- a/net/base/sdch_manager.h
+++ b/net/base/sdch_manager.h
@@ -25,11 +25,11 @@
#include <set>
#include <string>
+#include "base/gtest_prod_util.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "base/time.h"
#include "googleurl/src/gurl.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
//------------------------------------------------------------------------------
// Create a public interface to help us load SDCH dictionaries.
@@ -166,7 +166,7 @@ class SdchManager {
private:
friend class base::RefCounted<Dictionary>;
friend class SdchManager; // Only manager can construct an instance.
- FRIEND_TEST(SdchFilterTest, PathMatch);
+ FRIEND_TEST_ALL_PREFIXES(SdchFilterTest, PathMatch);
// Construct a vc-diff usable dictionary from the dictionary_text starting
// at the given offset. The supplied client_hash should be used to
diff --git a/net/base/transport_security_state.h b/net/base/transport_security_state.h
index 9cb2884..67c47e3 100644
--- a/net/base/transport_security_state.h
+++ b/net/base/transport_security_state.h
@@ -10,10 +10,10 @@
#include <string>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/lock.h"
#include "base/ref_counted.h"
#include "base/time.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class GURL;
@@ -93,7 +93,7 @@ class TransportSecurityState :
private:
friend class base::RefCountedThreadSafe<TransportSecurityState>;
- FRIEND_TEST(TransportSecurityStateTest, IsPreloaded);
+ FRIEND_TEST_ALL_PREFIXES(TransportSecurityStateTest, IsPreloaded);
~TransportSecurityState() {}
diff --git a/net/base/upload_data.h b/net/base/upload_data.h
index d139e18..01ca0da 100644
--- a/net/base/upload_data.h
+++ b/net/base/upload_data.h
@@ -10,11 +10,11 @@
#include "base/basictypes.h"
#include "base/file_path.h"
+#include "base/gtest_prod_util.h"
#include "base/logging.h"
#include "base/ref_counted.h"
#include "net/base/file_stream.h"
#include "base/time.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
namespace net {
@@ -102,8 +102,9 @@ class UploadData : public base::RefCounted<UploadData> {
uint64 content_length_;
FileStream* file_stream_;
- FRIEND_TEST(UploadDataStreamTest, FileSmallerThanLength);
- FRIEND_TEST(HttpNetworkTransactionTest, UploadFileSmallerThanLength);
+ FRIEND_TEST_ALL_PREFIXES(UploadDataStreamTest, FileSmallerThanLength);
+ FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionTest,
+ UploadFileSmallerThanLength);
};
void AppendBytes(const char* bytes, int bytes_len) {
diff --git a/net/base/x509_certificate.h b/net/base/x509_certificate.h
index 58b32bc..ec5105a 100644
--- a/net/base/x509_certificate.h
+++ b/net/base/x509_certificate.h
@@ -11,10 +11,10 @@
#include <string>
#include <vector>
+#include "base/gtest_prod_util.h"
#include "base/ref_counted.h"
#include "base/time.h"
#include "net/base/x509_cert_types.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
#if defined(OS_WIN)
#include <windows.h>
@@ -249,8 +249,8 @@ class X509Certificate : public base::RefCountedThreadSafe<X509Certificate> {
private:
friend class base::RefCountedThreadSafe<X509Certificate>;
- FRIEND_TEST(X509CertificateTest, Cache);
- FRIEND_TEST(X509CertificateTest, IntermediateCertificates);
+ FRIEND_TEST_ALL_PREFIXES(X509CertificateTest, Cache);
+ FRIEND_TEST_ALL_PREFIXES(X509CertificateTest, IntermediateCertificates);
class Cache;
diff --git a/net/disk_cache/block_files.h b/net/disk_cache/block_files.h
index 0625d2a..2fe41ad 100644
--- a/net/disk_cache/block_files.h
+++ b/net/disk_cache/block_files.h
@@ -11,9 +11,9 @@
#include <vector>
#include "base/file_path.h"
+#include "base/gtest_prod_util.h"
#include "net/disk_cache/addr.h"
#include "net/disk_cache/mapped_file.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
namespace disk_cache {
@@ -84,9 +84,9 @@ class BlockFiles {
FilePath path_; // Path to the backing folder.
std::vector<MappedFile*> block_files_; // The actual files.
- FRIEND_TEST(DiskCacheTest, BlockFiles_ZeroSizeFile);
- FRIEND_TEST(DiskCacheTest, BlockFiles_InvalidFile);
- FRIEND_TEST(DiskCacheTest, BlockFiles_Stats);
+ FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_ZeroSizeFile);
+ FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_InvalidFile);
+ FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_Stats);
DISALLOW_COPY_AND_ASSIGN(BlockFiles);
};
diff --git a/net/http/http_auth_cache.h b/net/http/http_auth_cache.h
index dc82107..423e432 100644
--- a/net/http/http_auth_cache.h
+++ b/net/http/http_auth_cache.h
@@ -9,11 +9,10 @@
#include <list>
#include <string>
+#include "base/gtest_prod_util.h"
#include "base/ref_counted.h"
#include "base/string16.h"
#include "googleurl/src/gurl.h"
-// This is needed for the FRIEND_TEST() macro.
-#include "testing/gtest/include/gtest/gtest_prod.h"
namespace net {
@@ -131,8 +130,8 @@ class HttpAuthCache::Entry {
private:
friend class HttpAuthCache;
- FRIEND_TEST(HttpAuthCacheTest, AddPath);
- FRIEND_TEST(HttpAuthCacheTest, AddToExistingEntry);
+ FRIEND_TEST_ALL_PREFIXES(HttpAuthCacheTest, AddPath);
+ FRIEND_TEST_ALL_PREFIXES(HttpAuthCacheTest, AddToExistingEntry);
Entry() {}
diff --git a/net/http/http_auth_handler_digest.h b/net/http/http_auth_handler_digest.h
index 1b03d17..777ac3c 100644
--- a/net/http/http_auth_handler_digest.h
+++ b/net/http/http_auth_handler_digest.h
@@ -8,13 +8,11 @@
#include <string>
+#include "base/gtest_prod_util.h"
#include "base/string16.h"
#include "net/http/http_auth_handler.h"
#include "net/http/http_auth_handler_factory.h"
-// This is needed for the FRIEND_TEST() macro.
-#include "testing/gtest/include/gtest/gtest_prod.h"
-
namespace net {
// Code for handling http digest authentication.
@@ -46,9 +44,9 @@ class HttpAuthHandlerDigest : public HttpAuthHandler {
std::string* auth_token);
private:
- FRIEND_TEST(HttpAuthHandlerDigestTest, ParseChallenge);
- FRIEND_TEST(HttpAuthHandlerDigestTest, AssembleCredentials);
- FRIEND_TEST(HttpNetworkTransactionTest, DigestPreAuthNonceCount);
+ FRIEND_TEST_ALL_PREFIXES(HttpAuthHandlerDigestTest, ParseChallenge);
+ FRIEND_TEST_ALL_PREFIXES(HttpAuthHandlerDigestTest, AssembleCredentials);
+ FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionTest, DigestPreAuthNonceCount);
// Possible values for the "algorithm" property.
enum DigestAlgorithm {
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h
index 3fa0e67..e07e91d 100644
--- a/net/http/http_network_transaction.h
+++ b/net/http/http_network_transaction.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "base/string16.h"
@@ -27,7 +28,6 @@
#include "net/http/http_transaction.h"
#include "net/proxy/proxy_service.h"
#include "net/socket/client_socket_pool.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
namespace net {
@@ -84,7 +84,7 @@ class HttpNetworkTransaction : public HttpTransaction {
virtual uint64 GetUploadProgress() const;
private:
- FRIEND_TEST(HttpNetworkTransactionTest, ResetStateForRestart);
+ FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionTest, ResetStateForRestart);
enum State {
STATE_RESOLVE_PROXY,
diff --git a/net/proxy/proxy_config_service_win.h b/net/proxy/proxy_config_service_win.h
index a79110c..308f445 100644
--- a/net/proxy/proxy_config_service_win.h
+++ b/net/proxy/proxy_config_service_win.h
@@ -9,8 +9,8 @@
#include <windows.h>
#include <winhttp.h>
+#include "base/gtest_prod_util.h"
#include "net/proxy/polling_proxy_config_service.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
namespace net {
@@ -21,7 +21,7 @@ class ProxyConfigServiceWin : public PollingProxyConfigService {
ProxyConfigServiceWin();
private:
- FRIEND_TEST(ProxyConfigServiceWinTest, SetFromIEConfig);
+ FRIEND_TEST_ALL_PREFIXES(ProxyConfigServiceWinTest, SetFromIEConfig);
static void GetCurrentProxyConfig(ProxyConfig* config);
diff --git a/net/proxy/proxy_script_fetcher.h b/net/proxy/proxy_script_fetcher.h
index 4ba3248..f6c1795 100644
--- a/net/proxy/proxy_script_fetcher.h
+++ b/net/proxy/proxy_script_fetcher.h
@@ -10,9 +10,9 @@
#define NET_PROXY_PROXY_SCRIPT_FETCHER_H_
#pragma once
+#include "base/gtest_prod_util.h"
#include "base/string16.h"
#include "net/base/completion_callback.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class GURL;
class URLRequestContext;
@@ -56,8 +56,8 @@ class ProxyScriptFetcher {
// Testing helpers (only available to unit-tests).
// --------------------------------------------------------------------------
private:
- FRIEND_TEST(ProxyScriptFetcherTest, Hang);
- FRIEND_TEST(ProxyScriptFetcherTest, TooLarge);
+ FRIEND_TEST_ALL_PREFIXES(ProxyScriptFetcherTest, Hang);
+ FRIEND_TEST_ALL_PREFIXES(ProxyScriptFetcherTest, TooLarge);
// Sets the maximum duration for a fetch to |timeout_ms|. Returns the previous
// bound.
diff --git a/net/proxy/proxy_service.h b/net/proxy/proxy_service.h
index 81ce871..1cb4840 100644
--- a/net/proxy/proxy_service.h
+++ b/net/proxy/proxy_service.h
@@ -9,6 +9,7 @@
#include <string>
#include <vector>
+#include "base/gtest_prod_util.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "base/waitable_event.h"
@@ -18,7 +19,6 @@
#include "net/proxy/proxy_config_service.h"
#include "net/proxy/proxy_server.h"
#include "net/proxy/proxy_info.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
class GURL;
class MessageLoop;
@@ -188,8 +188,8 @@ class ProxyService : public base::RefCountedThreadSafe<ProxyService>,
private:
friend class base::RefCountedThreadSafe<ProxyService>;
- FRIEND_TEST(ProxyServiceTest, UpdateConfigAfterFailedAutodetect);
- FRIEND_TEST(ProxyServiceTest, UpdateConfigFromPACToDirect);
+ FRIEND_TEST_ALL_PREFIXES(ProxyServiceTest, UpdateConfigAfterFailedAutodetect);
+ FRIEND_TEST_ALL_PREFIXES(ProxyServiceTest, UpdateConfigFromPACToDirect);
friend class PacRequest;
// TODO(eroman): change this to a std::set. Note that this requires updating
diff --git a/net/socket/socks_client_socket.h b/net/socket/socks_client_socket.h
index 0ed7ef6..515f337 100644
--- a/net/socket/socks_client_socket.h
+++ b/net/socket/socks_client_socket.h
@@ -8,6 +8,7 @@
#include <string>
+#include "base/gtest_prod_util.h"
#include "base/logging.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
@@ -18,7 +19,6 @@
#include "net/base/net_errors.h"
#include "net/base/net_log.h"
#include "net/socket/client_socket.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
namespace net {
@@ -64,9 +64,9 @@ class SOCKSClientSocket : public ClientSocket {
virtual int GetPeerAddress(AddressList* address) const;
private:
- FRIEND_TEST(SOCKSClientSocketTest, CompleteHandshake);
- FRIEND_TEST(SOCKSClientSocketTest, SOCKS4AFailedDNS);
- FRIEND_TEST(SOCKSClientSocketTest, SOCKS4AIfDomainInIPv6);
+ FRIEND_TEST_ALL_PREFIXES(SOCKSClientSocketTest, CompleteHandshake);
+ FRIEND_TEST_ALL_PREFIXES(SOCKSClientSocketTest, SOCKS4AFailedDNS);
+ FRIEND_TEST_ALL_PREFIXES(SOCKSClientSocketTest, SOCKS4AIfDomainInIPv6);
enum State {
STATE_RESOLVE_HOST,
diff --git a/net/spdy/spdy_framer.h b/net/spdy/spdy_framer.h
index dcd7170..070c870 100644
--- a/net/spdy/spdy_framer.h
+++ b/net/spdy/spdy_framer.h
@@ -17,10 +17,10 @@
#include <utility>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/logging.h"
#include "base/scoped_ptr.h"
#include "net/spdy/spdy_protocol.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
typedef struct z_stream_s z_stream; // Forward declaration for zlib.
@@ -245,8 +245,8 @@ class SpdyFramer {
static const int kDictionarySize;
protected:
- FRIEND_TEST(SpdyFramerTest, DataCompression);
- FRIEND_TEST(SpdyFramerTest, UnclosedStreamDataCompressors);
+ FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, DataCompression);
+ FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, UnclosedStreamDataCompressors);
friend class net::SpdyNetworkTransactionTest;
friend class net::HttpNetworkTransactionTest;
friend class net::HttpNetworkLayer; // This is temporary for the server.
diff --git a/net/spdy/spdy_network_transaction.h b/net/spdy/spdy_network_transaction.h
index 7df2e64..fbf1318 100644
--- a/net/spdy/spdy_network_transaction.h
+++ b/net/spdy/spdy_network_transaction.h
@@ -9,6 +9,7 @@
#include <deque>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "base/string16.h"
@@ -54,8 +55,8 @@ class SpdyNetworkTransaction : public HttpTransaction {
virtual uint64 GetUploadProgress() const;
private:
- FRIEND_TEST(SpdyNetworkTransactionTest, WindowUpdate);
- FRIEND_TEST(SpdyNetworkTransactionTest, WindowUpdateOverflow);
+ FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, WindowUpdate);
+ FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, WindowUpdateOverflow);
enum State {
STATE_INIT_CONNECTION,
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index 03db0ed..812aab8 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -12,6 +12,7 @@
#include <queue>
#include <string>
+#include "base/gtest_prod_util.h"
#include "base/linked_ptr.h"
#include "base/ref_counted.h"
#include "net/base/io_buffer.h"
@@ -28,7 +29,6 @@
#include "net/spdy/spdy_io_buffer.h"
#include "net/spdy/spdy_protocol.h"
#include "net/spdy/spdy_session_pool.h"
-#include "testing/gtest/include/gtest/gtest_prod.h" // For FRIEND_TEST
namespace net {
@@ -143,7 +143,7 @@ class SpdySession : public base::RefCounted<SpdySession>,
private:
friend class base::RefCounted<SpdySession>;
- FRIEND_TEST(SpdySessionTest, GetActivePushStream);
+ FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, GetActivePushStream);
enum State {
IDLE,
diff --git a/net/spdy/spdy_session_pool.h b/net/spdy/spdy_session_pool.h
index 1c18438..e0320d3 100644
--- a/net/spdy/spdy_session_pool.h
+++ b/net/spdy/spdy_session_pool.h
@@ -11,12 +11,12 @@
#include <string>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "net/base/host_port_pair.h"
#include "net/base/net_errors.h"
#include "net/base/network_change_notifier.h"
-#include "testing/gtest/include/gtest/gtest_prod.h" // For FRIEND_TEST
namespace net {
@@ -86,7 +86,7 @@ class SpdySessionPool
friend class base::RefCounted<SpdySessionPool>;
friend class SpdySessionPoolPeer; // For testing.
friend class SpdyNetworkTransactionTest; // For testing.
- FRIEND_TEST(SpdyNetworkTransactionTest, WindowUpdateOverflow);
+ FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, WindowUpdateOverflow);
typedef std::list<scoped_refptr<SpdySession> > SpdySessionList;
typedef std::map<HostPortPair, SpdySessionList*> SpdySessionsMap;