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

Side by Side Diff: chrome/browser/chromeos/policy/device_local_account_browsertest.cc

Issue 100573002: Move directory creation functions to 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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 // Verify that the extension was not copied to the account's extension cache. 716 // Verify that the extension was not copied to the account's extension cache.
717 EXPECT_FALSE(PathExists(GetCacheCRXFile( 717 EXPECT_FALSE(PathExists(GetCacheCRXFile(
718 kAccountId1, kGoodExtensionID, kGoodExtensionVersion))); 718 kAccountId1, kGoodExtensionID, kGoodExtensionVersion)));
719 } 719 }
720 720
721 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, ExtensionsCached) { 721 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, ExtensionsCached) {
722 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 722 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
723 723
724 // Pre-populate the device local account's extension cache with a hosted app 724 // Pre-populate the device local account's extension cache with a hosted app
725 // and an extension. 725 // and an extension.
726 EXPECT_TRUE(file_util::CreateDirectory( 726 EXPECT_TRUE(base::CreateDirectory(
727 GetCacheDirectoryForAccountID(kAccountId1))); 727 GetCacheDirectoryForAccountID(kAccountId1)));
728 base::FilePath test_dir; 728 base::FilePath test_dir;
729 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); 729 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir));
730 const base::FilePath cached_hosted_app = 730 const base::FilePath cached_hosted_app =
731 GetCacheCRXFile(kAccountId1, kHostedAppID, kHostedAppVersion); 731 GetCacheCRXFile(kAccountId1, kHostedAppID, kHostedAppVersion);
732 EXPECT_TRUE(CopyFile(test_dir.Append(kHostedAppCRXPath), 732 EXPECT_TRUE(CopyFile(test_dir.Append(kHostedAppCRXPath),
733 cached_hosted_app)); 733 cached_hosted_app));
734 const base::FilePath cached_extension = 734 const base::FilePath cached_extension =
735 GetCacheCRXFile(kAccountId1, kGoodExtensionID, kGoodExtensionVersion); 735 GetCacheCRXFile(kAccountId1, kGoodExtensionID, kGoodExtensionVersion);
736 EXPECT_TRUE(CopyFile(test_dir.Append(kGoodExtensionCRXPath), 736 EXPECT_TRUE(CopyFile(test_dir.Append(kGoodExtensionCRXPath),
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 if (!IsSessionStarted()) { 1082 if (!IsSessionStarted()) {
1083 content::WindowedNotificationObserver(chrome::NOTIFICATION_SESSION_STARTED, 1083 content::WindowedNotificationObserver(chrome::NOTIFICATION_SESSION_STARTED,
1084 base::Bind(IsSessionStarted)).Wait(); 1084 base::Bind(IsSessionStarted)).Wait();
1085 } 1085 }
1086 } 1086 }
1087 1087
1088 INSTANTIATE_TEST_CASE_P(TermsOfServiceTestInstance, 1088 INSTANTIATE_TEST_CASE_P(TermsOfServiceTestInstance,
1089 TermsOfServiceTest, testing::Bool()); 1089 TermsOfServiceTest, testing::Bool());
1090 1090
1091 } // namespace policy 1091 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698