OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/installer/mini_installer/configuration.h" | 5 #include "chrome/installer/mini_installer/configuration.h" |
6 | 6 |
| 7 #include <stddef.h> |
7 #include <stdlib.h> | 8 #include <stdlib.h> |
8 | 9 |
9 #include "base/basictypes.h" | |
10 #include "chrome/installer/mini_installer/appid.h" | 10 #include "chrome/installer/mini_installer/appid.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 using mini_installer::Configuration; | 13 using mini_installer::Configuration; |
14 | 14 |
15 class TestConfiguration : public Configuration { | 15 class TestConfiguration : public Configuration { |
16 public: | 16 public: |
17 explicit TestConfiguration(const wchar_t* command_line) | 17 explicit TestConfiguration(const wchar_t* command_line) |
18 : Configuration(), | 18 : Configuration(), |
19 open_registry_key_result_(false), | 19 open_registry_key_result_(false), |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 .is_multi_install()); | 154 .is_multi_install()); |
155 EXPECT_TRUE(TestConfiguration(L"spam.exe --multi-install") | 155 EXPECT_TRUE(TestConfiguration(L"spam.exe --multi-install") |
156 .is_multi_install()); | 156 .is_multi_install()); |
157 } | 157 } |
158 | 158 |
159 TEST(MiniInstallerConfigurationTest, IsSystemLevel) { | 159 TEST(MiniInstallerConfigurationTest, IsSystemLevel) { |
160 EXPECT_FALSE(TestConfiguration(L"spam.exe").is_system_level()); | 160 EXPECT_FALSE(TestConfiguration(L"spam.exe").is_system_level()); |
161 EXPECT_FALSE(TestConfiguration(L"spam.exe --chrome").is_system_level()); | 161 EXPECT_FALSE(TestConfiguration(L"spam.exe --chrome").is_system_level()); |
162 EXPECT_TRUE(TestConfiguration(L"spam.exe --system-level").is_system_level()); | 162 EXPECT_TRUE(TestConfiguration(L"spam.exe --system-level").is_system_level()); |
163 } | 163 } |
OLD | NEW |