Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1271)

Unified Diff: chrome/browser/unload_uitest.cc

Issue 2812003: TTF: Re-enable test that rely on ClickModalDialogButton since it is now... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/unload_uitest.cc
===================================================================
--- chrome/browser/unload_uitest.cc (revision 49836)
+++ chrome/browser/unload_uitest.cc (working copy)
@@ -166,7 +166,6 @@
}
void ClickModalDialogButton(MessageBoxFlags::DialogButton button) {
-#if defined(OS_WIN) || defined(OS_LINUX)
bool modal_dialog_showing = false;
MessageBoxFlags::DialogButton available_buttons;
EXPECT_TRUE(automation()->WaitForAppModalDialog());
@@ -175,10 +174,6 @@
ASSERT_TRUE(modal_dialog_showing);
EXPECT_TRUE((button & available_buttons) != 0);
EXPECT_TRUE(automation()->ClickAppModalDialogButton(button));
-#else
- // TODO(port): port this function to Mac.
- NOTIMPLEMENTED();
-#endif
}
};
@@ -285,29 +280,9 @@
LoadUrlAndQuitBrowser(UNLOAD_HTML, L"unload");
}
-#if defined(OS_MACOSX)
-// ClickModalDialogButton doesn't work on Mac: http://crbug.com/45031
-#define MAYBE_BrowserCloseBeforeUnloadOK DISABLED_BrowserCloseBeforeUnloadOK
-#define MAYBE_BrowserCloseBeforeUnloadCancel \
- DISABLED_BrowserCloseBeforeUnloadCancel
-#define MAYBE_BrowserCloseWithInnerFocusedFrame \
- DISABLED_BrowserCloseWithInnerFocusedFrame
-#elif defined(OS_LINUX)
-#define MAYBE_BrowserCloseBeforeUnloadOK BrowserCloseBeforeUnloadOK
-#define MAYBE_BrowserCloseBeforeUnloadCancel BrowserCloseBeforeUnloadCancel
-// Fails sometimes on Linux valgrind.
-#define MAYBE_BrowserCloseWithInnerFocusedFrame \
- FLAKY_BrowserCloseWithInnerFocusedFrame
-#else
-#define MAYBE_BrowserCloseWithInnerFocusedFrame \
- BrowserCloseWithInnerFocusedFrame
-#define MAYBE_BrowserCloseBeforeUnloadOK BrowserCloseBeforeUnloadOK
-#define MAYBE_BrowserCloseBeforeUnloadCancel BrowserCloseBeforeUnloadCancel
-#endif
-
// Tests closing the browser with a beforeunload handler and clicking
// OK in the beforeunload confirm dialog.
-TEST_F(UnloadTest, MAYBE_BrowserCloseBeforeUnloadOK) {
+TEST_F(UnloadTest, BrowserCloseBeforeUnloadOK) {
scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
ASSERT_TRUE(browser.get());
NavigateToDataURL(BEFORE_UNLOAD_HTML, L"beforeunload");
@@ -319,7 +294,7 @@
// Tests closing the browser with a beforeunload handler and clicking
// CANCEL in the beforeunload confirm dialog.
-TEST_F(UnloadTest, MAYBE_BrowserCloseBeforeUnloadCancel) {
+TEST_F(UnloadTest, BrowserCloseBeforeUnloadCancel) {
scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
ASSERT_TRUE(browser.get());
NavigateToDataURL(BEFORE_UNLOAD_HTML, L"beforeunload");
@@ -336,6 +311,15 @@
WaitForBrowserClosed();
}
+#if defined(OS_LINUX)
+// Fails sometimes on Linux valgrind. http://crbug.com/32615
+#define MAYBE_BrowserCloseWithInnerFocusedFrame \
+ FLAKY_BrowserCloseWithInnerFocusedFrame
+#else
+#define MAYBE_BrowserCloseWithInnerFocusedFrame \
+ BrowserCloseWithInnerFocusedFrame
+#endif
+
// Tests closing the browser and clicking OK in the beforeunload confirm dialog
// if an inner frame has the focus. See crbug.com/32615.
TEST_F(UnloadTest, MAYBE_BrowserCloseWithInnerFocusedFrame) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698