summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/safe_browsing/protocol_manager.h7
-rw-r--r--chrome/browser/safe_browsing/protocol_manager_unittest.cc8
2 files changed, 9 insertions, 6 deletions
diff --git a/chrome/browser/safe_browsing/protocol_manager.h b/chrome/browser/safe_browsing/protocol_manager.h
index c7276c6..3a6bc74 100644
--- a/chrome/browser/safe_browsing/protocol_manager.h
+++ b/chrome/browser/safe_browsing/protocol_manager.h
@@ -23,6 +23,7 @@
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/safe_browsing/safe_browsing_util.h"
#include "net/url_request/url_request.h"
+#include "testing/gtest/include/gtest/gtest_prod.h"
class MessageLoop;
class Task;
@@ -31,9 +32,9 @@ class Timer;
class SafeBrowsingProtocolManager : public URLFetcher::Delegate {
// Testing friends:
- friend class SafeBrowsingProtocolManagerTest_TestBackOffTimes_Test;
- friend class SafeBrowsingProtocolManagerTest_TestChunkStrings_Test;
- friend class SafeBrowsingProtocolManagerTest_TestGetHashBackOffTimes_Test;
+ FRIEND_TEST(SafeBrowsingProtocolManagerTest, TestBackOffTimes);
+ FRIEND_TEST(SafeBrowsingProtocolManagerTest, TestChunkStrings);
+ FRIEND_TEST(SafeBrowsingProtocolManagerTest, DISABLED_TestGetHashBackOffTimes);
public:
SafeBrowsingProtocolManager(SafeBrowsingService* sb_service,
diff --git a/chrome/browser/safe_browsing/protocol_manager_unittest.cc b/chrome/browser/safe_browsing/protocol_manager_unittest.cc
index f8eae65..3a81c91 100644
--- a/chrome/browser/safe_browsing/protocol_manager_unittest.cc
+++ b/chrome/browser/safe_browsing/protocol_manager_unittest.cc
@@ -8,9 +8,11 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "chrome/browser/safe_browsing/protocol_manager.h"
+class SafeBrowsingProtocolManagerTest : public testing::Test {
+};
// Ensure that we respect section 5 of the SafeBrowsing protocol specification.
-TEST(SafeBrowsingProtocolManagerTest, TestBackOffTimes) {
+TEST_F(SafeBrowsingProtocolManagerTest, TestBackOffTimes) {
SafeBrowsingProtocolManager pm(NULL, NULL, "", "");
pm.next_update_sec_ = 1800;
DCHECK(pm.back_off_fuzz_ >= 0.0 && pm.back_off_fuzz_ <= 1.0);
@@ -48,7 +50,7 @@ TEST(SafeBrowsingProtocolManagerTest, TestBackOffTimes) {
}
// Test string combinations with and without MAC.
-TEST(SafeBrowsingProtocolManagerTest, TestChunkStrings) {
+TEST_F(SafeBrowsingProtocolManagerTest, TestChunkStrings) {
SafeBrowsingProtocolManager pm(NULL, NULL, "", "");
// Add and Sub chunks.
@@ -81,7 +83,7 @@ TEST(SafeBrowsingProtocolManagerTest, TestChunkStrings) {
}
// Flakey, see http://code.google.com/p/chromium/issues/detail?id=1880
-TEST(SafeBrowsingProtocolManagerTest, DISABLED_TestGetHashBackOffTimes) {
+TEST_F(SafeBrowsingProtocolManagerTest, DISABLED_TestGetHashBackOffTimes) {
SafeBrowsingProtocolManager pm(NULL, NULL, "", "");
// No errors or back off time yet.