summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/tab_strip_controller_unittest.mm
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-30 17:11:10 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-30 17:11:10 +0000
commit940ccb2c357f17b2727b92999491cd4e0e25d0b4 (patch)
tree19b441db80d298393f5bacaddb5e4c50642c6f50 /chrome/browser/cocoa/tab_strip_controller_unittest.mm
parent7f74a4ee8538089c11895ff2f3b7110f3ca0061b (diff)
downloadchromium_src-940ccb2c357f17b2727b92999491cd4e0e25d0b4.zip
chromium_src-940ccb2c357f17b2727b92999491cd4e0e25d0b4.tar.gz
chromium_src-940ccb2c357f17b2727b92999491cd4e0e25d0b4.tar.bz2
Relanding this, it was missing the Mac unit-test change, that was breaking the build.
TBR=ben Closing the last tab with a download in-progress would cause the tab to be closed and become unusable if the user decides not to proceed with the browser shutdown. This is because we check for in-progress downloads when the browser is closed, and the tab is closed before that, leaving the tab-strip in a bad state. This CL ensures we also bring-up the confirmation dialog when the last tab is closed. BUG=10680 TEST=Start downloading a big file. While the file is downloading, close all tabs. When closing the last tab, the in-progress download dialog should be shown. Select the 'Wait for downloads', the download tab should be shown and the previous tab should still be displayed and functional. Close all tabs again, this time select the 'Close and cancel downloads' option, the browser should be closed. Review URL: http://codereview.chromium.org/100210 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14952 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tab_strip_controller_unittest.mm')
-rw-r--r--chrome/browser/cocoa/tab_strip_controller_unittest.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/tab_strip_controller_unittest.mm b/chrome/browser/cocoa/tab_strip_controller_unittest.mm
index 0a70a98d..f60ab03 100644
--- a/chrome/browser/cocoa/tab_strip_controller_unittest.mm
+++ b/chrome/browser/cocoa/tab_strip_controller_unittest.mm
@@ -49,6 +49,8 @@ class TestTabStripDelegate : public TabStripModelDelegate {
return true;
}
virtual void RestoreTab() { }
+
+ virtual bool CanCloseContentsAt(int index) { return true; }
};
class TabStripControllerTest : public testing::Test {