1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
--- chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc.orig 2023-04-05 11:05:06 UTC
+++ chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc
@@ -401,7 +401,7 @@ std::string GetFileExtension(FileExtension file_extens
}
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
- BUILDFLAG(IS_CHROMEOS)
+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
SiteConfig GetSiteConfigurationFromAppName(const std::string& app_name) {
SiteConfig config;
bool is_app_found = false;
@@ -582,7 +582,7 @@ std::vector<std::wstring> GetFileExtensionsForProgId(
}
#endif
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
bool IconManagerCheckIconTopLeftColor(WebAppIconManager& icon_manager,
const AppId& app_id,
std::vector<int> sizes_px,
@@ -917,7 +917,7 @@ void WebAppIntegrationTestDriver::TearDownOnMainThread
LOG(INFO) << "TearDownOnMainThread: Deleting dangling shortcuts.";
// TODO(crbug.com/1273568): Investigate the true source of flakiness instead
// of papering over it here.
-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
ASSERT_TRUE(override_registration_->test_override->ForceDeleteAllShortcuts());
#endif
LOG(INFO)
@@ -1715,7 +1715,7 @@ void WebAppIntegrationTestDriver::DeletePlatformShortc
if (app_name.empty()) {
app_name = GetSiteConfiguration(site).app_name;
}
-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
ASSERT_TRUE(override_registration_->test_override->IsShortcutCreated(
profile(), app_id, app_name));
ASSERT_TRUE(
@@ -2749,7 +2749,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginEna
app_state->id, app_state->name);
ASSERT_TRUE(icon_color.has_value());
ASSERT_THAT(site_config.icon_color, testing::Eq(icon_color.value()));
-#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
ASSERT_TRUE(override_registration_->test_override->IsRunOnOsLoginEnabled(
profile(), app_state->id, app_state->name));
#endif
@@ -2764,7 +2764,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis
GetAppBySiteMode(after_state_change_action_state_.get(), profile(), site);
ASSERT_TRUE(app_state);
base::ScopedAllowBlockingForTesting allow_blocking;
-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
ASSERT_FALSE(override_registration_->test_override->IsRunOnOsLoginEnabled(
profile(), app_state->id, app_state->name));
#endif
@@ -2774,7 +2774,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis
void WebAppIntegrationTestDriver::CheckSiteHandlesFile(
Site site,
FileExtension file_extension) {
-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
if (!BeforeStateCheckAction(__FUNCTION__)) {
return;
}
@@ -2786,7 +2786,7 @@ void WebAppIntegrationTestDriver::CheckSiteHandlesFile
void WebAppIntegrationTestDriver::CheckSiteNotHandlesFile(
Site site,
FileExtension file_extension) {
-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
if (!BeforeStateCheckAction(__FUNCTION__)) {
return;
}
@@ -3362,7 +3362,7 @@ base::FilePath WebAppIntegrationTestDriver::GetShortcu
base::FilePath shortcut_dir,
const std::string& app_name,
const AppId& app_id) {
-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
return override_registration_->test_override->GetShortcutPath(
profile(), shortcut_dir, app_id, app_name);
#else
@@ -3537,7 +3537,7 @@ bool WebAppIntegrationTestDriver::IsShortcutAndIconCre
const AppId& id) {
base::ScopedAllowBlockingForTesting allow_blocking;
bool is_shortcut_and_icon_correct = false;
-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
bool is_shortcut_correct =
override_registration_->test_override->IsShortcutCreated(profile, id,
name);
@@ -3581,7 +3581,7 @@ bool WebAppIntegrationTestDriver::DoIconColorsMatch(Pr
do_icon_colors_match =
(expected_icon_pixel_color == shortcut_pixel_color_apps_folder.value());
}
-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
SkColor expected_icon_pixel_color =
GetSiteConfigurationFromAppName(name).icon_color;
do_icon_colors_match = IconManagerCheckIconTopLeftColor(
@@ -3634,7 +3634,7 @@ bool WebAppIntegrationTestDriver::IsFileHandledBySite(
app_id);
is_file_handled =
shell_integration::CanApplicationHandleURL(app_path, test_file_url);
-#elif BUILDFLAG(IS_LINUX)
+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
AppId app_id = GetAppIdBySiteMode(site);
for (const LinuxFileRegistration& command :
override_registration_->test_override->linux_file_registration()) {
|