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

Side by Side Diff: chrome/common/mac/app_mode_chrome_locator_unittest.mm

Issue 265163006: [Mac] Rebuild app shims when they fail to dyload Chrome Framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase Created 6 years, 7 months 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #import "chrome/common/mac/app_mode_chrome_locator.h" 5 #import "chrome/common/mac/app_mode_chrome_locator.h"
6 6
7 #include <CoreFoundation/CoreFoundation.h> 7 #include <CoreFoundation/CoreFoundation.h>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 25 matching lines...) Expand all
36 36
37 TEST(ChromeLocatorTest, FindNonExistentBundle) { 37 TEST(ChromeLocatorTest, FindNonExistentBundle) {
38 base::FilePath dummy; 38 base::FilePath dummy;
39 EXPECT_FALSE(app_mode::FindBundleById(@"this.doesnt.exist", &dummy)); 39 EXPECT_FALSE(app_mode::FindBundleById(@"this.doesnt.exist", &dummy));
40 } 40 }
41 41
42 TEST(ChromeLocatorTest, GetNonExistentBundleInfo) { 42 TEST(ChromeLocatorTest, GetNonExistentBundleInfo) {
43 base::ScopedTempDir temp_dir; 43 base::ScopedTempDir temp_dir;
44 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); 44 ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
45 45
46 base::FilePath executable_path;
46 base::string16 raw_version; 47 base::string16 raw_version;
47 base::FilePath version_path; 48 base::FilePath version_path;
48 base::FilePath framework_path; 49 base::FilePath framework_path;
49 EXPECT_FALSE(app_mode::GetChromeBundleInfo(temp_dir.path(), 50 EXPECT_FALSE(app_mode::GetChromeBundleInfo(temp_dir.path(),
50 &raw_version, &version_path, &framework_path)); 51 &executable_path, &raw_version, &version_path, &framework_path));
51 } 52 }
52 53
53 TEST(ChromeLocatorTest, GetChromeBundleInfo) { 54 TEST(ChromeLocatorTest, GetChromeBundleInfo) {
54 using app_mode::GetChromeBundleInfo; 55 using app_mode::GetChromeBundleInfo;
55 56
56 base::FilePath chrome_bundle_path; 57 base::FilePath chrome_bundle_path;
57 GetChromeBundlePath(&chrome_bundle_path); 58 GetChromeBundlePath(&chrome_bundle_path);
58 ASSERT_TRUE(base::DirectoryExists(chrome_bundle_path)); 59 ASSERT_TRUE(base::DirectoryExists(chrome_bundle_path));
59 60
61 base::FilePath executable_path;
60 base::string16 raw_version; 62 base::string16 raw_version;
61 base::FilePath version_path; 63 base::FilePath version_path;
62 base::FilePath framework_path; 64 base::FilePath framework_path;
63 EXPECT_TRUE(GetChromeBundleInfo(chrome_bundle_path, 65 EXPECT_TRUE(GetChromeBundleInfo(chrome_bundle_path,
64 &raw_version, &version_path, &framework_path)); 66 &executable_path, &raw_version, &version_path, &framework_path));
67 EXPECT_TRUE(base::PathExists(executable_path));
65 EXPECT_GT(raw_version.size(), 0U); 68 EXPECT_GT(raw_version.size(), 0U);
66 EXPECT_TRUE(base::DirectoryExists(version_path)); 69 EXPECT_TRUE(base::DirectoryExists(version_path));
67 EXPECT_TRUE(base::PathExists(framework_path)); 70 EXPECT_TRUE(base::PathExists(framework_path));
68 } 71 }
OLDNEW
« chrome/browser/web_applications/web_app.cc ('K') | « chrome/common/mac/app_mode_chrome_locator.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698