diff options
author | scheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-12 02:04:55 +0000 |
---|---|---|
committer | scheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-12 02:04:55 +0000 |
commit | 81e495e82fde9e5cc3f7421ee60329085b67a69c (patch) | |
tree | dc7153fe6d6ac6fdd406a8b1abc4d42e894c80e9 | |
parent | 1a24d8c83f4e4f6560c6646127f6ae26d9dab120 (diff) | |
download | chromium_src-81e495e82fde9e5cc3f7421ee60329085b67a69c.zip chromium_src-81e495e82fde9e5cc3f7421ee60329085b67a69c.tar.gz chromium_src-81e495e82fde9e5cc3f7421ee60329085b67a69c.tar.bz2 |
Enable WindowsApiProperties on mac by fixing DCHECK.
ReleaseFullScreen incorrectly DCHECKed > 0 instead of >= 0.
BUG=229700
Review URL: https://chromiumcodereview.appspot.com/13973005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193825 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/mac/mac_util.mm | 8 | ||||
-rw-r--r-- | chrome/browser/extensions/api/app_window/app_window_apitest.cc | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/base/mac/mac_util.mm b/base/mac/mac_util.mm index a6501a41..f758b52 100644 --- a/base/mac/mac_util.mm +++ b/base/mac/mac_util.mm @@ -180,6 +180,9 @@ void RequestFullScreen(FullScreenMode mode) { return; DCHECK_GE(g_full_screen_requests[mode], 0); + if (mode < 0) + return; + g_full_screen_requests[mode] = std::max(g_full_screen_requests[mode] + 1, 1); SetUIMode(); } @@ -190,7 +193,10 @@ void ReleaseFullScreen(FullScreenMode mode) { if (mode >= kNumFullScreenModes) return; - DCHECK_GT(g_full_screen_requests[mode], 0); + DCHECK_GE(g_full_screen_requests[mode], 0); + if (mode < 0) + return; + g_full_screen_requests[mode] = std::max(g_full_screen_requests[mode] - 1, 0); SetUIMode(); } diff --git a/chrome/browser/extensions/api/app_window/app_window_apitest.cc b/chrome/browser/extensions/api/app_window/app_window_apitest.cc index 59f3f87..7d4e0e3 100644 --- a/chrome/browser/extensions/api/app_window/app_window_apitest.cc +++ b/chrome/browser/extensions/api/app_window/app_window_apitest.cc @@ -125,7 +125,7 @@ IN_PROC_BROWSER_TEST_F(ExperimentalPlatformAppBrowserTest, WindowsApiSetIcon) { // don't work under ubuntu unity. // (crbug.com/162794 and https://bugs.launchpad.net/unity/+bug/998073). // TODO(linux_aura) http://crbug.com/163931 -#if defined(TOOLKIT_VIEWS) && !(defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA)) +#if (defined(TOOLKIT_VIEWS) || defined(OS_MACOSX)) && !(defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA)) IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, WindowsApiProperties) { EXPECT_TRUE( |