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

Unified Diff: chrome/installer/mini_installer/configuration_test.cc

Issue 1277833002: Revert of Return Windows error code when create-process fails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/installer/mini_installer/configuration.cc ('k') | chrome/installer/mini_installer/mini_installer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/mini_installer/configuration_test.cc
diff --git a/chrome/installer/mini_installer/configuration_test.cc b/chrome/installer/mini_installer/configuration_test.cc
index f92b17ff081bc6715ef46d99566d6511f374e180..27a3d80fc02191fce6feaeb9cb427a982bdfb7c3 100644
--- a/chrome/installer/mini_installer/configuration_test.cc
+++ b/chrome/installer/mini_installer/configuration_test.cc
@@ -17,31 +17,10 @@
explicit TestConfiguration(const wchar_t* command_line) : Configuration() {
Initialize(command_line);
}
- explicit TestConfiguration(const wchar_t* command_line,
- LONG ret, const wchar_t* value)
- : Configuration(),
- open_registry_key_result_(true),
- read_registry_value_result_(ret),
- read_registry_value_(value) {
- Initialize(command_line);
- }
- void SetRegistryResults(bool openkey, LONG ret, const wchar_t* value) {
- }
private:
- bool open_registry_key_result_;
- LONG read_registry_value_result_;
- const wchar_t* read_registry_value_ = L"";
-
void Initialize(const wchar_t* command_line) {
Clear();
ASSERT_TRUE(ParseCommandLine(command_line));
- }
- bool ReadClientStateRegistryValue(
- const HKEY root_key, const wchar_t* app_guid,
- LONG* retval, ValueString& value) override {
- *retval = read_registry_value_result_;
- value.assign(read_registry_value_);
- return open_registry_key_result_;
}
};
@@ -94,28 +73,12 @@
EXPECT_TRUE(std::wstring(google_update::kAppGuid) ==
TestConfiguration(L"spam.exe --chrome").chrome_app_guid());
EXPECT_TRUE(std::wstring(google_update::kAppGuid) ==
+ TestConfiguration(L"spam.exe --multi-install --chrome")
+ .chrome_app_guid());
+ EXPECT_TRUE(std::wstring(google_update::kAppGuid) ==
TestConfiguration(L"spam.exe --chrome-frame").chrome_app_guid());
EXPECT_TRUE(std::wstring(google_update::kSxSAppGuid) ==
TestConfiguration(L"spam.exe --chrome-sxs").chrome_app_guid());
- EXPECT_TRUE(std::wstring(google_update::kMultiInstallAppGuid) ==
- TestConfiguration(L"spam.exe --multi-install --chrome")
- .chrome_app_guid());
- EXPECT_TRUE(std::wstring(google_update::kMultiInstallAppGuid) ==
- TestConfiguration(L"spam.exe --multi-install --chrome",
- ERROR_INVALID_FUNCTION, L"")
- .chrome_app_guid());
- EXPECT_TRUE(std::wstring(google_update::kAppGuid) ==
- TestConfiguration(L"spam.exe --multi-install --chrome",
- ERROR_FILE_NOT_FOUND, L"")
- .chrome_app_guid());
- EXPECT_TRUE(std::wstring(google_update::kAppGuid) ==
- TestConfiguration(L"spam.exe --multi-install --chrome",
- ERROR_SUCCESS, L"foo-bar")
- .chrome_app_guid());
- EXPECT_TRUE(std::wstring(google_update::kMultiInstallAppGuid) ==
- TestConfiguration(L"spam.exe --multi-install --chrome",
- ERROR_SUCCESS, L"foo-multi")
- .chrome_app_guid());
}
TEST(MiniInstallerConfigurationTest, HasChrome) {
« no previous file with comments | « chrome/installer/mini_installer/configuration.cc ('k') | chrome/installer/mini_installer/mini_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698