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

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

Issue 2900803002: Renaming zip_analyzer_results to archive_analyzer_results (Closed)
Patch Set: minor fixups Created 3 years, 7 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 | « chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc ('k') | chrome/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/sandboxed_zip_analyzer_unittest.cc
diff --git a/chrome/browser/safe_browsing/sandboxed_zip_analyzer_unittest.cc b/chrome/browser/safe_browsing/sandboxed_zip_analyzer_unittest.cc
index d29f7a984f5926b93461b7fa7cd6d335ac427f69..5bb3bff50afdb80146bf6033d1076364857665f2 100644
--- a/chrome/browser/safe_browsing/sandboxed_zip_analyzer_unittest.cc
+++ b/chrome/browser/safe_browsing/sandboxed_zip_analyzer_unittest.cc
@@ -14,7 +14,7 @@
#include "base/run_loop.h"
#include "build/build_config.h"
#include "chrome/common/chrome_paths.h"
-#include "chrome/common/safe_browsing/zip_analyzer_results.h"
+#include "chrome/common/safe_browsing/archive_analyzer_results.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "content/public/test/test_utils.h"
#include "crypto/sha2.h"
@@ -38,9 +38,8 @@ class SandboxedZipAnalyzerTest : public ::testing::Test {
class ResultsGetter {
public:
ResultsGetter(const base::Closure& quit_closure,
- zip_analyzer::Results* results)
- : quit_closure_(quit_closure),
- results_(results) {
+ ArchiveAnalyzerResults* results)
+ : quit_closure_(quit_closure), results_(results) {
DCHECK(results);
results->success = false;
}
@@ -51,13 +50,13 @@ class SandboxedZipAnalyzerTest : public ::testing::Test {
}
private:
- void OnZipAnalyzerResults(const zip_analyzer::Results& results) {
+ void OnZipAnalyzerResults(const ArchiveAnalyzerResults& results) {
*results_ = results;
quit_closure_.Run();
}
base::Closure quit_closure_;
- zip_analyzer::Results* results_;
+ ArchiveAnalyzerResults* results_;
DISALLOW_COPY_AND_ASSIGN(ResultsGetter);
};
@@ -73,7 +72,7 @@ class SandboxedZipAnalyzerTest : public ::testing::Test {
// Runs a sandboxed zip analyzer on |file_path|, writing its results into
// |results|.
void RunAnalyzer(const base::FilePath& file_path,
- zip_analyzer::Results* results) {
+ ArchiveAnalyzerResults* results) {
DCHECK(results);
base::RunLoop run_loop;
ResultsGetter results_getter(run_loop.QuitClosure(), results);
@@ -179,7 +178,7 @@ const SandboxedZipAnalyzerTest::BinaryData SandboxedZipAnalyzerTest::kJSEFile =
};
TEST_F(SandboxedZipAnalyzerTest, NoBinaries) {
- zip_analyzer::Results results;
+ ArchiveAnalyzerResults results;
RunAnalyzer(dir_test_data_.AppendASCII("zipfile_no_binaries.zip"), &results);
ASSERT_TRUE(results.success);
EXPECT_FALSE(results.has_executable);
@@ -188,7 +187,7 @@ TEST_F(SandboxedZipAnalyzerTest, NoBinaries) {
}
TEST_F(SandboxedZipAnalyzerTest, OneUnsignedBinary) {
- zip_analyzer::Results results;
+ ArchiveAnalyzerResults results;
RunAnalyzer(dir_test_data_.AppendASCII("zipfile_one_unsigned_binary.zip"),
&results);
ASSERT_TRUE(results.success);
@@ -199,7 +198,7 @@ TEST_F(SandboxedZipAnalyzerTest, OneUnsignedBinary) {
}
TEST_F(SandboxedZipAnalyzerTest, TwoBinariesOneSigned) {
- zip_analyzer::Results results;
+ ArchiveAnalyzerResults results;
RunAnalyzer(dir_test_data_.AppendASCII("zipfile_two_binaries_one_signed.zip"),
&results);
ASSERT_TRUE(results.success);
@@ -211,7 +210,7 @@ TEST_F(SandboxedZipAnalyzerTest, TwoBinariesOneSigned) {
}
TEST_F(SandboxedZipAnalyzerTest, ZippedArchiveNoBinaries) {
- zip_analyzer::Results results;
+ ArchiveAnalyzerResults results;
RunAnalyzer(dir_test_data_.AppendASCII("zipfile_archive_no_binaries.zip"),
&results);
ASSERT_TRUE(results.success);
@@ -224,7 +223,7 @@ TEST_F(SandboxedZipAnalyzerTest, ZippedArchiveNoBinaries) {
}
TEST_F(SandboxedZipAnalyzerTest, ZippedRarArchiveNoBinaries) {
- zip_analyzer::Results results;
+ ArchiveAnalyzerResults results;
RunAnalyzer(dir_test_data_.AppendASCII("zipfile_rar_archive_no_binaries.zip"),
&results);
ASSERT_TRUE(results.success);
@@ -237,7 +236,7 @@ TEST_F(SandboxedZipAnalyzerTest, ZippedRarArchiveNoBinaries) {
}
TEST_F(SandboxedZipAnalyzerTest, ZippedArchiveAndBinaries) {
- zip_analyzer::Results results;
+ ArchiveAnalyzerResults results;
RunAnalyzer(dir_test_data_.AppendASCII("zipfile_archive_and_binaries.zip"),
&results);
ASSERT_TRUE(results.success);
@@ -252,7 +251,7 @@ TEST_F(SandboxedZipAnalyzerTest, ZippedArchiveAndBinaries) {
TEST_F(SandboxedZipAnalyzerTest,
ZippedArchiveAndBinariesWithTrailingSpaceAndPeriodChars) {
- zip_analyzer::Results results;
+ ArchiveAnalyzerResults results;
RunAnalyzer(dir_test_data_.AppendASCII("zipfile_two_binaries_one_archive_"
"trailing_space_and_period_chars.zip"),
&results);
@@ -273,7 +272,7 @@ TEST_F(SandboxedZipAnalyzerTest,
}
TEST_F(SandboxedZipAnalyzerTest, ZippedJSEFile) {
- zip_analyzer::Results results;
+ ArchiveAnalyzerResults results;
RunAnalyzer(dir_test_data_.AppendASCII("zipfile_one_jse_file.zip"), &results);
ASSERT_TRUE(results.success);
EXPECT_TRUE(results.has_executable);
« no previous file with comments | « chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc ('k') | chrome/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698