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); | |
346 } | 345 } |
347 | 346 |
348 int Visit(const std::string& json_data) { | 347 int Visit(const std::string& json_data) { |
349 // Give the test json file to the provider for parsing. | 348 // Give the test json file to the provider for parsing. |
350 provider_.reset(new extensions::ExternalProviderImpl( | 349 provider_.reset(new extensions::ExternalProviderImpl( |
351 this, | 350 this, |
352 new extensions::ExternalTestingLoader(json_data, fake_base_path_), | 351 new extensions::ExternalTestingLoader(json_data, fake_base_path_), |
353 profile_.get(), | 352 profile_.get(), |
354 Manifest::EXTERNAL_PREF, | 353 Manifest::EXTERNAL_PREF, |
355 Manifest::EXTERNAL_PREF_DOWNLOAD, | 354 Manifest::EXTERNAL_PREF_DOWNLOAD, |
(...skipping 7448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7804 | 7803 |
7805 service()->Observe(chrome::NOTIFICATION_PROFILE_DESTRUCTION_STARTED, | 7804 service()->Observe(chrome::NOTIFICATION_PROFILE_DESTRUCTION_STARTED, |
7806 content::Source<Profile>(profile()), | 7805 content::Source<Profile>(profile()), |
7807 content::NotificationService::NoDetails()); | 7806 content::NotificationService::NoDetails()); |
7808 EXPECT_EQ(UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN, unloaded_reason_); | 7807 EXPECT_EQ(UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN, unloaded_reason_); |
7809 EXPECT_EQ(0u, registry()->enabled_extensions().size()); | 7808 EXPECT_EQ(0u, registry()->enabled_extensions().size()); |
7810 EXPECT_EQ(0u, registry()->disabled_extensions().size()); | 7809 EXPECT_EQ(0u, registry()->disabled_extensions().size()); |
7811 EXPECT_EQ(0u, registry()->terminated_extensions().size()); | 7810 EXPECT_EQ(0u, registry()->terminated_extensions().size()); |
7812 EXPECT_EQ(0u, registry()->blacklisted_extensions().size()); | 7811 EXPECT_EQ(0u, registry()->blacklisted_extensions().size()); |
7813 } | 7812 } |
OLD | NEW |