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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_store_unittest.cc

Issue 1420123003: Move more declarations from c/b/sb/sb_util.h to components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@01_components
Patch Set: Minor: Replace safe_browsing_util:: with safe_browsing:: and use safe_browsing:: namespace prefix Created 5 years, 1 month 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
Index: chrome/browser/safe_browsing/safe_browsing_store_unittest.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_store_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_store_unittest.cc
index 047510577cadfd6d3a4ca93877af2dc48e5fafbd..fb8ab17523cac8d9fdd749c1fd164228de606995 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_store_unittest.cc
@@ -3,18 +3,19 @@
// found in the LICENSE file.
#include "chrome/browser/safe_browsing/safe_browsing_store.h"
+#include "components/safe_browsing_db/util.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
-const SBFullHash kHash1 = SBFullHashForString("one");
-const SBFullHash kHash2 = SBFullHashForString("two");
-const SBFullHash kHash3 = SBFullHashForString("three");
-const SBFullHash kHash4 = SBFullHashForString("four");
-const SBFullHash kHash5 = SBFullHashForString("five");
-const SBFullHash kHash6 = SBFullHashForString("six");
-const SBFullHash kHash7 = SBFullHashForString("seven");
+const SBFullHash kHash1 = safe_browsing::SBFullHashForString("one");
+const SBFullHash kHash2 = safe_browsing::SBFullHashForString("two");
+const SBFullHash kHash3 = safe_browsing::SBFullHashForString("three");
+const SBFullHash kHash4 = safe_browsing::SBFullHashForString("four");
+const SBFullHash kHash5 = safe_browsing::SBFullHashForString("five");
+const SBFullHash kHash6 = safe_browsing::SBFullHashForString("six");
+const SBFullHash kHash7 = safe_browsing::SBFullHashForString("seven");
const int kAddChunk1 = 1; // Use different chunk numbers just in case.
const int kSubChunk1 = 2;
@@ -217,9 +218,9 @@ TEST(SafeBrowsingStoreTest, SBProcessSubsKnockout) {
ASSERT_EQ(2U, add_hashes.size());
EXPECT_EQ(kAddChunk5, add_hashes[0].chunk_id);
- EXPECT_TRUE(SBFullHashEqual(kHash4, add_hashes[0].full_hash));
+ EXPECT_TRUE(safe_browsing::SBFullHashEqual(kHash4, add_hashes[0].full_hash));
EXPECT_EQ(kAddChunk6, add_hashes[1].chunk_id);
- EXPECT_TRUE(SBFullHashEqual(kHash6, add_hashes[1].full_hash));
+ EXPECT_TRUE(safe_browsing::SBFullHashEqual(kHash6, add_hashes[1].full_hash));
ASSERT_EQ(1U, sub_prefixes.size());
EXPECT_EQ(kSubChunk4, sub_prefixes[0].chunk_id);
@@ -229,7 +230,7 @@ TEST(SafeBrowsingStoreTest, SBProcessSubsKnockout) {
ASSERT_EQ(1U, sub_hashes.size());
EXPECT_EQ(kSubChunk3, sub_hashes[0].chunk_id);
EXPECT_EQ(kAddChunk3, sub_hashes[0].add_chunk_id);
- EXPECT_TRUE(SBFullHashEqual(kHash7, sub_hashes[0].full_hash));
+ EXPECT_TRUE(safe_browsing::SBFullHashEqual(kHash7, sub_hashes[0].full_hash));
}
// Test chunk deletions, and ordering of deletions WRT subs knocking
@@ -274,7 +275,7 @@ TEST(SafeBrowsingStoreTest, SBProcessSubsDeleteChunk) {
ASSERT_EQ(1U, add_hashes.size());
EXPECT_EQ(kAddChunk1, add_hashes[0].chunk_id);
- EXPECT_TRUE(SBFullHashEqual(kHash6, add_hashes[0].full_hash));
+ EXPECT_TRUE(safe_browsing::SBFullHashEqual(kHash6, add_hashes[0].full_hash));
EXPECT_TRUE(sub_prefixes.empty());
EXPECT_TRUE(sub_hashes.empty());
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc ('k') | chrome/browser/safe_browsing/safe_browsing_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698