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

Side by Side Diff: chrome/browser/extensions/extension_service_unittest.cc

Issue 89523002: Move Posix file utils to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/extensions/extension_service_unittest.h" 5 #include "chrome/browser/extensions/extension_service_unittest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 2564 matching lines...) Expand 10 before | Expand all | Expand 10 after
2575 ASSERT_TRUE(base::PathExists(source_icon)); 2575 ASSERT_TRUE(base::PathExists(source_icon));
2576 2576
2577 // Set up the temporary extension directory. 2577 // Set up the temporary extension directory.
2578 base::ScopedTempDir temp; 2578 base::ScopedTempDir temp;
2579 ASSERT_TRUE(temp.CreateUniqueTempDir()); 2579 ASSERT_TRUE(temp.CreateUniqueTempDir());
2580 base::FilePath extension_path = temp.path(); 2580 base::FilePath extension_path = temp.path();
2581 base::FilePath manifest = extension_path.Append( 2581 base::FilePath manifest = extension_path.Append(
2582 extensions::kManifestFilename); 2582 extensions::kManifestFilename);
2583 base::FilePath icon_symlink = extension_path.AppendASCII("icon.png"); 2583 base::FilePath icon_symlink = extension_path.AppendASCII("icon.png");
2584 base::CopyFile(source_manifest, manifest); 2584 base::CopyFile(source_manifest, manifest);
2585 file_util::CreateSymbolicLink(source_icon, icon_symlink); 2585 base::CreateSymbolicLink(source_icon, icon_symlink);
2586 2586
2587 // Load extension. 2587 // Load extension.
2588 InitializeEmptyExtensionService(); 2588 InitializeEmptyExtensionService();
2589 extensions::UnpackedInstaller::Create(service_)->Load(extension_path); 2589 extensions::UnpackedInstaller::Create(service_)->Load(extension_path);
2590 base::RunLoop().RunUntilIdle(); 2590 base::RunLoop().RunUntilIdle();
2591 2591
2592 EXPECT_TRUE(GetErrors().empty()); 2592 EXPECT_TRUE(GetErrors().empty());
2593 ASSERT_EQ(1u, loaded_.size()); 2593 ASSERT_EQ(1u, loaded_.size());
2594 EXPECT_EQ(1u, service_->extensions()->size()); 2594 EXPECT_EQ(1u, service_->extensions()->size());
2595 } 2595 }
(...skipping 4162 matching lines...) Expand 10 before | Expand all | Expand 10 after
6758 service_->ReconcileKnownDisabled(); 6758 service_->ReconcileKnownDisabled();
6759 expected_extensions.insert(good2); 6759 expected_extensions.insert(good2);
6760 expected_disabled_extensions.erase(good2); 6760 expected_disabled_extensions.erase(good2);
6761 6761
6762 EXPECT_EQ(expected_extensions, service_->extensions()->GetIDs()); 6762 EXPECT_EQ(expected_extensions, service_->extensions()->GetIDs());
6763 EXPECT_EQ(expected_disabled_extensions, 6763 EXPECT_EQ(expected_disabled_extensions,
6764 service_->disabled_extensions()->GetIDs()); 6764 service_->disabled_extensions()->GetIDs());
6765 } 6765 }
6766 6766
6767 #endif // #if !(defined(OS_LINUX) && defined(USE_AURA) && !defined(OS_CHROMEOS)) 6767 #endif // #if !(defined(OS_LINUX) && defined(USE_AURA) && !defined(OS_CHROMEOS))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698