diff options
author | pam@chromium.org <pam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-10 20:19:12 +0000 |
---|---|---|
committer | pam@chromium.org <pam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-10 20:19:12 +0000 |
commit | 1a3eba4ac216a8687e61499318b8d1167ecfb962 (patch) | |
tree | 5190274a0341d310768b23aad7631fb709a455f4 | |
parent | f4032c709d33424c8e30e38bbaf8024eb4d293b1 (diff) | |
download | chromium_src-1a3eba4ac216a8687e61499318b8d1167ecfb962.zip chromium_src-1a3eba4ac216a8687e61499318b8d1167ecfb962.tar.gz chromium_src-1a3eba4ac216a8687e61499318b8d1167ecfb962.tar.bz2 |
Implement missing method and re-enable three browser_tests on Mac.
BUG=29424
TEST=covered by browser_tests
Review URL: http://codereview.chromium.org/669133
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41198 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser_browsertest.cc | 27 | ||||
-rw-r--r-- | chrome/browser/js_modal_dialog_mac.mm | 4 |
2 files changed, 6 insertions, 25 deletions
diff --git a/chrome/browser/browser_browsertest.cc b/chrome/browser/browser_browsertest.cc index edce8e0..236c913 100644 --- a/chrome/browser/browser_browsertest.cc +++ b/chrome/browser/browser_browsertest.cc @@ -183,14 +183,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, Title) { EXPECT_EQ(WideToUTF16(test_title), tab_title); } -#if defined(OS_MACOSX) -// http://crbug.com//29424 -#define MAYBE_JavascriptAlertActivatesTab DISABLED_JavascriptAlertActivatesTab -#else -#define MAYBE_JavascriptAlertActivatesTab JavascriptAlertActivatesTab -#endif - -IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_JavascriptAlertActivatesTab) { +IN_PROC_BROWSER_TEST_F(BrowserTest, JavascriptAlertActivatesTab) { GURL url(ui_test_utils::GetTestUrl(L".", L"title1.html")); ui_test_utils::NavigateToURL(browser(), url); browser()->AddTabWithURL(url, GURL(), PageTransition::TYPED, @@ -230,16 +223,9 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, ThirtyFourTabs) { } } -#if defined(OS_MACOSX) -// http://crbug.com//29424 -#define MAYBE_ReloadThenCancelBeforeUnload DISABLED_ReloadThenCancelBeforeUnload -#else -#define MAYBE_ReloadThenCancelBeforeUnload ReloadThenCancelBeforeUnload -#endif - // Test for crbug.com/22004. Reloading a page with a before unload handler and // then canceling the dialog should not leave the throbber spinning. -IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_ReloadThenCancelBeforeUnload) { +IN_PROC_BROWSER_TEST_F(BrowserTest, ReloadThenCancelBeforeUnload) { GURL url("data:text/html," + BEFORE_UNLOAD_HTML); ui_test_utils::NavigateToURL(browser(), url); @@ -255,16 +241,9 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_ReloadThenCancelBeforeUnload) { ExecuteJavascriptInWebFrame(L"", L"onbeforeunload=null;"); } -#if defined(OS_MACOSX) -// http://crbug.com//29424 -#define MAYBE_SingleBeforeUnloadAfterWindowClose DISABLED_SingleBeforeUnloadAfterWindowClose -#else -#define MAYBE_SingleBeforeUnloadAfterWindowClose FLAKY_SingleBeforeUnloadAfterWindowClose -#endif - // Test for crbug.com/11647. A page closed with window.close() should not have // two beforeunload dialogs shown. -IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_SingleBeforeUnloadAfterWindowClose) { +IN_PROC_BROWSER_TEST_F(BrowserTest, FLAKY_SingleBeforeUnloadAfterWindowClose) { browser()->GetSelectedTabContents()->render_view_host()-> ExecuteJavascriptInWebFrame(L"", OPEN_NEW_BEFOREUNLOAD_PAGE); diff --git a/chrome/browser/js_modal_dialog_mac.mm b/chrome/browser/js_modal_dialog_mac.mm index 9ab04d8..44eb86e 100644 --- a/chrome/browser/js_modal_dialog_mac.mm +++ b/chrome/browser/js_modal_dialog_mac.mm @@ -157,8 +157,10 @@ int JavaScriptAppModalDialog::GetDialogButtons() { return 0; } +// On Mac, this is only used in testing. void JavaScriptAppModalDialog::AcceptWindow() { - NOTIMPLEMENTED(); + NSButton* first = [[dialog_ buttons] objectAtIndex:0]; + [first performClick:nil]; } void JavaScriptAppModalDialog::CancelWindow() { |