Commit ed0a4090 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

Suppress a few -Wunreachable-code warnings on macOS.

No behavior change.

Bug: 346399
Change-Id: Ia658bb2a3ba42f7da364688691bd926bb0c0bbb3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2115783
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752581}
parent 65520792
......@@ -99,9 +99,7 @@ void BrowserCloseManager::CheckForDownloadsInProgress() {
#if defined(OS_MACOSX)
// Mac has its own in-progress downloads prompt in app_controller_mac.mm.
CloseBrowsers();
return;
#endif
#else
int download_count =
DownloadCoreService::NonMaliciousDownloadCountAllProfiles();
if (download_count == 0) {
......@@ -112,6 +110,7 @@ void BrowserCloseManager::CheckForDownloadsInProgress() {
ConfirmCloseWithPendingDownloads(
download_count,
base::Bind(&BrowserCloseManager::OnReportDownloadsCancellable, this));
#endif
}
void BrowserCloseManager::ConfirmCloseWithPendingDownloads(
......
......@@ -43,10 +43,8 @@ IN_PROC_BROWSER_TEST_F(ChromeNetworkServiceRestartBrowserTest,
StoragePartitionGetNetworkContext) {
if (content::IsInProcessNetworkService())
return;
#if defined(OS_MACOSX)
// |NetworkServiceTestHelper| doesn't work on browser_tests on macOS.
return;
#endif
#if !defined(OS_MACOSX)
StoragePartition* partition =
BrowserContext::GetDefaultStoragePartition(browser()->profile());
......@@ -65,6 +63,7 @@ IN_PROC_BROWSER_TEST_F(ChromeNetworkServiceRestartBrowserTest,
EXPECT_NE(old_network_context, partition->GetNetworkContext());
EXPECT_EQ(net::OK,
LoadBasicRequest(partition->GetNetworkContext(), GetTestURL()));
#endif
}
// Make sure |SystemNetworkContextManager::GetContext()| returns valid interface
......@@ -73,10 +72,8 @@ IN_PROC_BROWSER_TEST_F(ChromeNetworkServiceRestartBrowserTest,
SystemNetworkContextManagerGetContext) {
if (content::IsInProcessNetworkService())
return;
#if defined(OS_MACOSX)
// |NetworkServiceTestHelper| doesn't work on browser_tests on macOS.
return;
#endif
#if !defined(OS_MACOSX)
SystemNetworkContextManager* system_network_context_manager =
g_browser_process->system_network_context_manager();
......@@ -96,6 +93,7 @@ IN_PROC_BROWSER_TEST_F(ChromeNetworkServiceRestartBrowserTest,
EXPECT_EQ(net::OK,
LoadBasicRequest(system_network_context_manager->GetContext(),
GetTestURL()));
#endif
}
} // namespace content
......@@ -818,8 +818,7 @@ base::string16 Browser::GetWindowTitleFromWebContents(
#if defined(OS_MACOSX)
// On Mac, we don't want to suffix the page title with the application name.
return title;
#endif
#else
// If there is no title and this is an app, fall back on the app name. This
// ensures that the native window gets a title which is important for a11y,
// for example the window selector uses the Aura window title.
......@@ -836,6 +835,7 @@ base::string16 Browser::GetWindowTitleFromWebContents(
? l10n_util::GetStringFUTF16(IDS_BROWSER_WINDOW_TITLE_FORMAT,
title)
: title;
#endif
}
// static
......
......@@ -1107,8 +1107,7 @@ const DrawQuad* GLRenderer::CanPassBeDrawnDirectly(const RenderPass* pass) {
// On Macs, this path can sometimes lead to all black output.
// TODO(enne): investigate this and remove this hack.
return nullptr;
#endif
#else
// Can only collapse a single tile quad.
if (pass->quad_list.size() != 1)
return nullptr;
......@@ -1151,6 +1150,7 @@ const DrawQuad* GLRenderer::CanPassBeDrawnDirectly(const RenderPass* pass) {
return nullptr;
return tile_quad;
#endif
}
void GLRenderer::DrawRenderPassQuad(const RenderPassDrawQuad* quad,
......
......@@ -96,11 +96,8 @@ TEST_F(HTMLCanvasElementModuleTest, TransferControlToOffscreen) {
// Verifies that a desynchronized canvas has the appropriate opacity/blending
// information sent to the CompositorFrameSink.
TEST_P(HTMLCanvasElementModuleTest, LowLatencyCanvasCompositorFrameOpacity) {
#if defined(OS_MACOSX)
// TODO(crbug.com/922218): enable desynchronized on Mac.
return;
#endif
#if !defined(OS_MACOSX)
// This test relies on GpuMemoryBuffers being supported and enabled for low
// latency canvas. The latter is true only on ChromeOS in production.
ScopedTestingPlatformSupport<LowLatencyTestPlatform> platform;
......@@ -165,6 +162,7 @@ TEST_P(HTMLCanvasElementModuleTest, LowLatencyCanvasCompositorFrameOpacity) {
platform->RunUntilIdle();
SharedGpuContext::ResetForTesting();
#endif
}
INSTANTIATE_TEST_SUITE_P(All, HTMLCanvasElementModuleTest, Values(true, false));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment