OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <algorithm> | 5 #include <algorithm> |
6 #include <set> | 6 #include <set> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 fake_base_path_(fake_base_path), | 335 fake_base_path_(fake_base_path), |
336 expected_creation_flags_(Extension::NO_FLAGS) { | 336 expected_creation_flags_(Extension::NO_FLAGS) { |
337 profile_.reset(new TestingProfile); | 337 profile_.reset(new TestingProfile); |
338 } | 338 } |
339 | 339 |
340 MockProviderVisitor(base::FilePath fake_base_path, | 340 MockProviderVisitor(base::FilePath fake_base_path, |
341 int expected_creation_flags) | 341 int expected_creation_flags) |
342 : ids_found_(0), | 342 : ids_found_(0), |
343 fake_base_path_(fake_base_path), | 343 fake_base_path_(fake_base_path), |
344 expected_creation_flags_(expected_creation_flags) { | 344 expected_creation_flags_(expected_creation_flags) { |
| 345 profile_.reset(new TestingProfile); |
345 } | 346 } |
346 | 347 |
347 int Visit(const std::string& json_data) { | 348 int Visit(const std::string& json_data) { |
348 // Give the test json file to the provider for parsing. | 349 // Give the test json file to the provider for parsing. |
349 provider_.reset(new extensions::ExternalProviderImpl( | 350 provider_.reset(new extensions::ExternalProviderImpl( |
350 this, | 351 this, |
351 new extensions::ExternalTestingLoader(json_data, fake_base_path_), | 352 new extensions::ExternalTestingLoader(json_data, fake_base_path_), |
352 profile_.get(), | 353 profile_.get(), |
353 Manifest::EXTERNAL_PREF, | 354 Manifest::EXTERNAL_PREF, |
354 Manifest::EXTERNAL_PREF_DOWNLOAD, | 355 Manifest::EXTERNAL_PREF_DOWNLOAD, |
(...skipping 7448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7803 | 7804 |
7804 service()->Observe(chrome::NOTIFICATION_PROFILE_DESTRUCTION_STARTED, | 7805 service()->Observe(chrome::NOTIFICATION_PROFILE_DESTRUCTION_STARTED, |
7805 content::Source<Profile>(profile()), | 7806 content::Source<Profile>(profile()), |
7806 content::NotificationService::NoDetails()); | 7807 content::NotificationService::NoDetails()); |
7807 EXPECT_EQ(UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN, unloaded_reason_); | 7808 EXPECT_EQ(UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN, unloaded_reason_); |
7808 EXPECT_EQ(0u, registry()->enabled_extensions().size()); | 7809 EXPECT_EQ(0u, registry()->enabled_extensions().size()); |
7809 EXPECT_EQ(0u, registry()->disabled_extensions().size()); | 7810 EXPECT_EQ(0u, registry()->disabled_extensions().size()); |
7810 EXPECT_EQ(0u, registry()->terminated_extensions().size()); | 7811 EXPECT_EQ(0u, registry()->terminated_extensions().size()); |
7811 EXPECT_EQ(0u, registry()->blacklisted_extensions().size()); | 7812 EXPECT_EQ(0u, registry()->blacklisted_extensions().size()); |
7812 } | 7813 } |
OLD | NEW |