summaryrefslogtreecommitdiffstats
path: root/chrome/browser/unload_uitest.cc
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-25 22:31:35 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-25 22:31:35 +0000
commit231e69ea9c2d234a4d1403b9385ee829d81f0dd0 (patch)
tree65ba27943b506af5aa50cb371897ee18bb328bb9 /chrome/browser/unload_uitest.cc
parentc26d1bc07e04f18b709e656125948684c0ad43de (diff)
downloadchromium_src-231e69ea9c2d234a4d1403b9385ee829d81f0dd0.zip
chromium_src-231e69ea9c2d234a4d1403b9385ee829d81f0dd0.tar.gz
chromium_src-231e69ea9c2d234a4d1403b9385ee829d81f0dd0.tar.bz2
Build unload_uitest.cc on the Mac, with a few of the tests disabled
Enables all the unload UI tests on the Mac that don't put up modal dialogs. Disables those that do, and adds a tracking bug for them. Also switches the hanging Linux test to DISABLED instead of not being compiled. BUG=45021,45031 TEST=More tests run Review URL: http://codereview.chromium.org/2202001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48210 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/unload_uitest.cc')
-rw-r--r--chrome/browser/unload_uitest.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/chrome/browser/unload_uitest.cc b/chrome/browser/unload_uitest.cc
index 62072f9..688576a 100644
--- a/chrome/browser/unload_uitest.cc
+++ b/chrome/browser/unload_uitest.cc
@@ -176,8 +176,7 @@ class UnloadTest : public UITest {
EXPECT_TRUE((button & available_buttons) != 0);
EXPECT_TRUE(automation()->ClickAppModalDialogButton(button));
#else
- // TODO(port): port this function if and when the tests that use it are
- // enabled (currently they are not being run even on windows).
+ // TODO(port): port this function to Mac.
NOTIMPLEMENTED();
#endif
}
@@ -286,9 +285,21 @@ TEST_F(UnloadTest, BrowserCloseUnload) {
LoadUrlAndQuitBrowser(UNLOAD_HTML, L"unload");
}
+#if defined(OS_LINUX)
+// Hangs on Linux: http://crbug.com/45021
+#define BrowserCloseBeforeUnloadOK DISABLED_BrowserCloseBeforeUnloadOK
+#define BrowserCloseBeforeUnloadCancel DISABLED_BrowserCloseBeforeUnloadCancel
+#define BrowserCloseWithInnerFocusedFrame \
+ DISABLED_BrowserCloseWithInnerFocusedFrame
+#elif defined(OS_MACOSX)
+// ClickModalDialogButton doesn't work on Mac: http://crbug.com/45031
+#define BrowserCloseBeforeUnloadOK DISABLED_BrowserCloseBeforeUnloadOK
+#define BrowserCloseBeforeUnloadCancel DISABLED_BrowserCloseBeforeUnloadCancel
+#define BrowserCloseWithInnerFocusedFrame \
+ DISABLED_BrowserCloseWithInnerFocusedFrame
+#endif
// Tests closing the browser with a beforeunload handler and clicking
// OK in the beforeunload confirm dialog.
-#if !defined(OS_LINUX)
TEST_F(UnloadTest, BrowserCloseBeforeUnloadOK) {
scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
ASSERT_TRUE(browser.get());
@@ -331,7 +342,6 @@ TEST_F(UnloadTest, BrowserCloseWithInnerFocusedFrame) {
WaitForBrowserClosed();
EXPECT_FALSE(IsBrowserRunning());
}
-#endif // !defined(OS_LINUX)
// Tests closing the browser with a beforeunload handler that takes
// two seconds to run.