OLD | NEW |
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/browser/web_applications/web_app_mac.h" | 5 #import "chrome/browser/web_applications/web_app_mac.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <sys/xattr.h> | 9 #include <sys/xattr.h> |
10 | 10 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 info.url = GURL("http://example.com/"); | 67 info.url = GURL("http://example.com/"); |
68 info.profile_path = base::FilePath("user_data_dir").Append("Profile 1"); | 68 info.profile_path = base::FilePath("user_data_dir").Append("Profile 1"); |
69 info.profile_name = "profile name"; | 69 info.profile_name = "profile name"; |
70 return info; | 70 return info; |
71 } | 71 } |
72 | 72 |
73 class WebAppShortcutCreatorTest : public testing::Test { | 73 class WebAppShortcutCreatorTest : public testing::Test { |
74 protected: | 74 protected: |
75 WebAppShortcutCreatorTest() {} | 75 WebAppShortcutCreatorTest() {} |
76 | 76 |
77 virtual void SetUp() { | 77 void SetUp() override { |
78 base::mac::SetBaseBundleID(kFakeChromeBundleId); | 78 base::mac::SetBaseBundleID(kFakeChromeBundleId); |
79 | 79 |
80 EXPECT_TRUE(temp_app_data_dir_.CreateUniqueTempDir()); | 80 EXPECT_TRUE(temp_app_data_dir_.CreateUniqueTempDir()); |
81 EXPECT_TRUE(temp_destination_dir_.CreateUniqueTempDir()); | 81 EXPECT_TRUE(temp_destination_dir_.CreateUniqueTempDir()); |
82 app_data_dir_ = temp_app_data_dir_.path(); | 82 app_data_dir_ = temp_app_data_dir_.path(); |
83 destination_dir_ = temp_destination_dir_.path(); | 83 destination_dir_ = temp_destination_dir_.path(); |
84 | 84 |
85 info_ = GetShortcutInfo(); | 85 info_ = GetShortcutInfo(); |
86 shim_base_name_ = base::FilePath( | 86 shim_base_name_ = base::FilePath( |
87 info_.profile_path.BaseName().value() + | 87 info_.profile_path.BaseName().value() + |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 [file_handler_1 objectForKey:app_mode::kCFBundleTypeRoleKey]); | 344 [file_handler_1 objectForKey:app_mode::kCFBundleTypeRoleKey]); |
345 NSArray* file_handler_1_extensions = | 345 NSArray* file_handler_1_extensions = |
346 [file_handler_1 objectForKey:app_mode::kCFBundleTypeExtensionsKey]; | 346 [file_handler_1 objectForKey:app_mode::kCFBundleTypeExtensionsKey]; |
347 EXPECT_TRUE([file_handler_1_extensions containsObject:@"ext2"]); | 347 EXPECT_TRUE([file_handler_1_extensions containsObject:@"ext2"]); |
348 NSArray* file_handler_1_types = | 348 NSArray* file_handler_1_types = |
349 [file_handler_1 objectForKey:app_mode::kCFBundleTypeMIMETypesKey]; | 349 [file_handler_1 objectForKey:app_mode::kCFBundleTypeMIMETypesKey]; |
350 EXPECT_TRUE([file_handler_1_types containsObject:@"type2"]); | 350 EXPECT_TRUE([file_handler_1_types containsObject:@"type2"]); |
351 } | 351 } |
352 | 352 |
353 } // namespace web_app | 353 } // namespace web_app |
OLD | NEW |