This source file includes following definitions.
- TEST
#include <windows.h>
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
#include "base/path_service.h"
#include "chrome/installer/mini_installer/decompress.h"
#include "testing/gtest/include/gtest/gtest.h"
TEST(MiniDecompressTest, ExpandTest) {
base::FilePath source_path;
PathService::Get(base::DIR_SOURCE_ROOT, &source_path);
source_path = source_path.Append(FILE_PATH_LITERAL("chrome"))
.Append(FILE_PATH_LITERAL("installer"))
.Append(FILE_PATH_LITERAL("test"))
.Append(FILE_PATH_LITERAL("data"))
.Append(FILE_PATH_LITERAL("SETUP.EX_"));
base::ScopedTempDir temp_dir;
EXPECT_TRUE(temp_dir.CreateUniqueTempDir());
base::FilePath dest_path(
temp_dir.path().Append(FILE_PATH_LITERAL("setup.exe")));
EXPECT_TRUE(mini_installer::Expand(source_path.value().c_str(),
dest_path.value().c_str()));
DWORD type = static_cast<DWORD>(-1);
EXPECT_TRUE(GetBinaryType(dest_path.value().c_str(), &type));
EXPECT_EQ(SCS_32BIT_BINARY, type);
}