summaryrefslogtreecommitdiffstats
path: root/chrome/installer/test
diff options
context:
space:
mode:
authorrickyz <rickyz@chromium.org>2015-04-30 14:55:06 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-30 21:56:21 +0000
commitb356c585d9f6841dcc7df05b8e7cfad0a2b4bdf6 (patch)
tree600ee2cda53749188ccd29f80af44abd669f243a /chrome/installer/test
parentf02f0cc4ee8f12e53cd57a97bd2d6ef4c3af87ff (diff)
downloadchromium_src-b356c585d9f6841dcc7df05b8e7cfad0a2b4bdf6.zip
chromium_src-b356c585d9f6841dcc7df05b8e7cfad0a2b4bdf6.tar.gz
chromium_src-b356c585d9f6841dcc7df05b8e7cfad0a2b4bdf6.tar.bz2
Revert of Add installer_util_unittests to the GN windows build (patchset #5 id:80001 of https://codereview.chromium.org/1062743006/)
Reason for revert: Compilation errors that look related to the installer_util_strings.rc move: http://build.chromium.org/p/chromium/builders/Win/builds/31460 Original issue's description: > Add installer_util_unittests to the GN windows build > > This fixes some C++ Warnings on Windows to avoid having to add suppressions to the GN build. > > Moves the generated strings header to the same place in the gen tree as it is in the source tree. Update includes. > > CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg > > Committed: https://crrev.com/cb55755a09b9e2d8c5b05b7a4ad2ff8631e15b13 > Cr-Commit-Position: refs/heads/master@{#327790} TBR=dpranke@chromium.org,brettw@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1116263002 Cr-Commit-Position: refs/heads/master@{#327799}
Diffstat (limited to 'chrome/installer/test')
-rw-r--r--chrome/installer/test/BUILD.gn60
-rw-r--r--chrome/installer/test/alternate_version_generator.cc6
-rw-r--r--chrome/installer/test/resource_updater.cc3
3 files changed, 4 insertions, 65 deletions
diff --git a/chrome/installer/test/BUILD.gn b/chrome/installer/test/BUILD.gn
deleted file mode 100644
index ac4ef59..0000000
--- a/chrome/installer/test/BUILD.gn
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("//testing/test.gni")
-
-assert(is_win)
-
-executable("alternate_version_generator") {
- testonly = true
- sources = [
- "alternate_version_generator_main.cc",
- ]
-
- deps = [
- ":alternate_version_generator_lib",
- "//base",
- "//base/test:test_support",
- "//chrome/common:constants",
- "//chrome/installer/util",
- "//testing/gtest",
- ]
-}
-
-source_set("alternate_version_generator_lib") {
- testonly = true
- sources = [
- "alternate_version_generator.cc",
- "alternate_version_generator.h",
- "pe_image_resources.cc",
- "pe_image_resources.h",
- "resource_loader.cc",
- "resource_loader.h",
- "resource_updater.cc",
- "resource_updater.h",
- ]
- deps = [
- "//base",
- "//chrome/installer/util",
- "//chrome/common:constants",
- ]
-}
-
-test("upgrade_test") {
- sources = [
- "run_all_tests.cc",
- "upgrade_test.cc",
- ]
- deps = [
- ":alternate_version_generator_lib",
- "//base",
- "//base/test:test_support",
- "//chrome/common:constants",
- "//chrome/installer/util",
- "//testing/gtest",
- ]
- data_deps = [
- # 'mini_installer.gyp:mini_installer', TODO(GYP)
- ]
-}
diff --git a/chrome/installer/test/alternate_version_generator.cc b/chrome/installer/test/alternate_version_generator.cc
index 039c1ef..e50c293 100644
--- a/chrome/installer/test/alternate_version_generator.cc
+++ b/chrome/installer/test/alternate_version_generator.cc
@@ -226,7 +226,7 @@ bool RunProcessAndWait(const wchar_t* exe_path, const std::wstring& cmdline,
<< cmdline << "\".";
result = false;
} else {
- DCHECK_NE(*exit_code, static_cast<int>(STILL_ACTIVE));
+ DCHECK_NE(*exit_code, STILL_ACTIVE);
}
}
} else {
@@ -547,7 +547,7 @@ bool GenerateAlternateVersion(const base::FilePath& original_installer_path,
base::WriteFile(setup_ex_,
reinterpret_cast<const char*>(resource_data.first),
static_cast<int>(resource_data.second));
- if (written != static_cast<int>(resource_data.second)) {
+ if (written != resource_data.second) {
LOG(DFATAL) << "Failed writing \"" << setup_ex_.value() << "\"";
return false;
}
@@ -559,7 +559,7 @@ bool GenerateAlternateVersion(const base::FilePath& original_installer_path,
base::WriteFile(chrome_packed_7z,
reinterpret_cast<const char*>(resource_data.first),
static_cast<int>(resource_data.second));
- if (written != static_cast<int>(resource_data.second)) {
+ if (written != resource_data.second) {
LOG(DFATAL) << "Failed writing \"" << chrome_packed_7z.value() << "\"";
return false;
}
diff --git a/chrome/installer/test/resource_updater.cc b/chrome/installer/test/resource_updater.cc
index 4c6be27..cf05094 100644
--- a/chrome/installer/test/resource_updater.cc
+++ b/chrome/installer/test/resource_updater.cc
@@ -43,8 +43,7 @@ bool ResourceUpdater::Update(const std::wstring& name,
if (input.Initialize(input_file)) {
if (UpdateResource(handle_, type.c_str(), name.c_str(), language_id,
- const_cast<uint8*>(input.data()),
- static_cast<DWORD>(input.length()))
+ const_cast<uint8*>(input.data()), input.length())
!= FALSE) {
return true;
}