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

Unified Diff: net/base/sdch_manager_unittest.cc

Issue 509563003: Remove implicit conversions from scoped_refptr to T* in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « net/base/file_stream_unittest.cc ('k') | net/base/upload_file_element_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/sdch_manager_unittest.cc
diff --git a/net/base/sdch_manager_unittest.cc b/net/base/sdch_manager_unittest.cc
index a46bf808f4eb8967ab336a262a0ec876364726d1..b5429b4c7a2decd15f253f61541060197003ef58 100644
--- a/net/base/sdch_manager_unittest.cc
+++ b/net/base/sdch_manager_unittest.cc
@@ -197,7 +197,7 @@ TEST_F(SdchManagerTest, CanUseHTTPSDictionaryOverHTTPSIfEnabled) {
std::string server_hash;
sdch_manager()->GenerateHash(dictionary_text, &client_hash, &server_hash);
sdch_manager()->GetVcdiffDictionary(server_hash, target_url, &dictionary);
- EXPECT_TRUE(dictionary != NULL);
+ EXPECT_TRUE(dictionary.get() != NULL);
}
TEST_F(SdchManagerTest, CanNotUseHTTPDictionaryOverHTTPS) {
@@ -220,7 +220,7 @@ TEST_F(SdchManagerTest, CanNotUseHTTPDictionaryOverHTTPS) {
std::string server_hash;
sdch_manager()->GenerateHash(dictionary_text, &client_hash, &server_hash);
sdch_manager()->GetVcdiffDictionary(server_hash, target_url, &dictionary);
- EXPECT_TRUE(dictionary == NULL);
+ EXPECT_TRUE(dictionary.get() == NULL);
}
TEST_F(SdchManagerTest, CanNotUseHTTPSDictionaryOverHTTP) {
@@ -243,7 +243,7 @@ TEST_F(SdchManagerTest, CanNotUseHTTPSDictionaryOverHTTP) {
std::string server_hash;
sdch_manager()->GenerateHash(dictionary_text, &client_hash, &server_hash);
sdch_manager()->GetVcdiffDictionary(server_hash, target_url, &dictionary);
- EXPECT_TRUE(dictionary == NULL);
+ EXPECT_TRUE(dictionary.get() == NULL);
}
TEST_F(SdchManagerTest, FailToSetDomainMismatchDictionary) {
@@ -429,7 +429,7 @@ TEST_F(SdchManagerTest, CanUseMultipleManagers) {
server_hash_1,
GURL("http://" + dictionary_domain_1 + "/random_url"),
&dictionary);
- EXPECT_TRUE(dictionary);
+ EXPECT_TRUE(dictionary.get());
EXPECT_TRUE(second_manager.AddSdchDictionary(
dictionary_text_2, GURL("http://" + dictionary_domain_2)));
@@ -437,19 +437,19 @@ TEST_F(SdchManagerTest, CanUseMultipleManagers) {
server_hash_2,
GURL("http://" + dictionary_domain_2 + "/random_url"),
&dictionary);
- EXPECT_TRUE(dictionary);
+ EXPECT_TRUE(dictionary.get());
sdch_manager()->GetVcdiffDictionary(
server_hash_2,
GURL("http://" + dictionary_domain_2 + "/random_url"),
&dictionary);
- EXPECT_FALSE(dictionary);
+ EXPECT_FALSE(dictionary.get());
second_manager.GetVcdiffDictionary(
server_hash_1,
GURL("http://" + dictionary_domain_1 + "/random_url"),
&dictionary);
- EXPECT_FALSE(dictionary);
+ EXPECT_FALSE(dictionary.get());
}
TEST_F(SdchManagerTest, HttpsCorrectlySupported) {
@@ -481,7 +481,7 @@ TEST_F(SdchManagerTest, ClearDictionaryData) {
server_hash,
GURL("http://" + dictionary_domain + "/random_url"),
&dictionary);
- EXPECT_TRUE(dictionary);
+ EXPECT_TRUE(dictionary.get());
sdch_manager()->BlacklistDomain(GURL(blacklist_url),
SdchManager::MIN_PROBLEM_CODE);
@@ -494,7 +494,7 @@ TEST_F(SdchManagerTest, ClearDictionaryData) {
server_hash,
GURL("http://" + dictionary_domain + "/random_url"),
&dictionary);
- EXPECT_FALSE(dictionary);
+ EXPECT_FALSE(dictionary.get());
EXPECT_TRUE(sdch_manager()->IsInSupportedDomain(blacklist_url));
}
« no previous file with comments | « net/base/file_stream_unittest.cc ('k') | net/base/upload_file_element_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698