OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/chromeos/extensions/device_local_account_management_pol
icy_provider.h" | 5 #include "chrome/browser/chromeos/extensions/device_local_account_management_pol
icy_provider.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 EXPECT_NE(base::string16(), error); | 207 EXPECT_NE(base::string16(), error); |
208 error.clear(); | 208 error.clear(); |
209 } | 209 } |
210 | 210 |
211 // Verify that a platform app with an unsafe manifest entry cannot be | 211 // Verify that a platform app with an unsafe manifest entry cannot be |
212 // installed. Since the program logic is based entirely on whitelists, there | 212 // installed. Since the program logic is based entirely on whitelists, there |
213 // is no significant advantage in testing all unsafe manifest entries | 213 // is no significant advantage in testing all unsafe manifest entries |
214 // individually. | 214 // individually. |
215 { | 215 { |
216 base::DictionaryValue values; | 216 base::DictionaryValue values; |
217 values.Set("commands", new base::DictionaryValue()); | 217 values.Set("chrome_settings_overrides", new base::DictionaryValue()); |
218 extension = CreatePlatformAppWithExtraValues( | 218 extension = CreatePlatformAppWithExtraValues( |
219 &values, | 219 &values, |
220 extensions::Manifest::EXTERNAL_POLICY, | 220 extensions::Manifest::EXTERNAL_POLICY, |
221 extensions::Extension::NO_FLAGS); | 221 extensions::Extension::NO_FLAGS); |
222 ASSERT_TRUE(extension); | 222 ASSERT_TRUE(extension); |
223 | 223 |
224 EXPECT_FALSE(provider.UserMayLoad(extension.get(), &error)); | 224 EXPECT_FALSE(provider.UserMayLoad(extension.get(), &error)); |
225 EXPECT_NE(base::string16(), error); | 225 EXPECT_NE(base::string16(), error); |
226 error.clear(); | 226 error.clear(); |
227 } | 227 } |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 // types of device-local accounts cannot be installed in a single-app kiosk | 459 // types of device-local accounts cannot be installed in a single-app kiosk |
460 // session. | 460 // session. |
461 extension = CreateRegularExtension(kWhitelistedId); | 461 extension = CreateRegularExtension(kWhitelistedId); |
462 ASSERT_TRUE(extension.get()); | 462 ASSERT_TRUE(extension.get()); |
463 EXPECT_TRUE(provider.UserMayLoad(extension.get(), &error)); | 463 EXPECT_TRUE(provider.UserMayLoad(extension.get(), &error)); |
464 EXPECT_EQ(base::string16(), error); | 464 EXPECT_EQ(base::string16(), error); |
465 error.clear(); | 465 error.clear(); |
466 } | 466 } |
467 | 467 |
468 } // namespace chromeos | 468 } // namespace chromeos |
OLD | NEW |