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

Side by Side Diff: components/safe_browsing_db/safe_browsing_api_handler_unittest.cc

Issue 1624723002: Move remote_db_manager into the safe_browsing_db component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fetch, rebase, format Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/safe_browsing/metadata.pb.h" 5 #include "components/safe_browsing_db/metadata.pb.h"
6 #include "chrome/browser/safe_browsing/safe_browsing_api_handler_util.h" 6 #include "components/safe_browsing_db/safe_browsing_api_handler_util.h"
7 #include "chrome/browser/safe_browsing/safe_browsing_util.h" 7 #include "components/safe_browsing_db/util.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace safe_browsing { 10 namespace safe_browsing {
11 11
12 class SafeBrowsingApiHandlerUtilTest : public ::testing::Test { 12 class SafeBrowsingApiHandlerUtilTest : public ::testing::Test {
13 protected: 13 protected:
14 SBThreatType threat_; 14 SBThreatType threat_;
15 std::string pb_str_; 15 std::string pb_str_;
16 16
17 UmaRemoteCallResult ResetAndParseJson(const std::string& json) { 17 UmaRemoteCallResult ResetAndParseJson(const std::string& json) {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 EXPECT_EQ(SB_THREAT_TYPE_URL_PHISHING, threat_); 114 EXPECT_EQ(SB_THREAT_TYPE_URL_PHISHING, threat_);
115 EXPECT_EQ(MalwarePatternType::DISTRIBUTION, ParsePatternType()); 115 EXPECT_EQ(MalwarePatternType::DISTRIBUTION, ParsePatternType());
116 116
117 EXPECT_EQ(UMA_STATUS_UNSAFE, 117 EXPECT_EQ(UMA_STATUS_UNSAFE,
118 ResetAndParseJson("{\"matches\":[{\"threat_type\":\"5\", " 118 ResetAndParseJson("{\"matches\":[{\"threat_type\":\"5\", "
119 "\"se_pattern_type\":\"junk\"}]}")); 119 "\"se_pattern_type\":\"junk\"}]}"));
120 EXPECT_TRUE(pb_str_.empty()); 120 EXPECT_TRUE(pb_str_.empty());
121 } 121 }
122 122
123 } // namespace safe_browsing 123 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « components/safe_browsing_db/safe_browsing_api_handler.cc ('k') | components/safe_browsing_db/safe_browsing_api_handler_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698