summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 18:26:56 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 18:26:56 +0000
commit491a7a578c700c2f23505d810f9b8cfa140a9caa (patch)
treecc7ab074ab60d575fdf17e3d86bbfcf83776d082
parented6669fe61f7c9a8c2b2f7941001190eceba9092 (diff)
downloadchromium_src-491a7a578c700c2f23505d810f9b8cfa140a9caa.zip
chromium_src-491a7a578c700c2f23505d810f9b8cfa140a9caa.tar.gz
chromium_src-491a7a578c700c2f23505d810f9b8cfa140a9caa.tar.bz2
Experimental fix to fix the flaky AutomatedUITestBase.CloseTab.
BUG=14774 TEST=AutoamtedUITestBase.FLAKY_CloseTab stops being flaky? Review URL: http://codereview.chromium.org/660324 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40391 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/gtk/bookmark_bar_gtk.cc3
-rw-r--r--chrome/browser/gtk/bookmark_bar_gtk.h5
2 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/gtk/bookmark_bar_gtk.cc b/chrome/browser/gtk/bookmark_bar_gtk.cc
index 280de08..265664e 100644
--- a/chrome/browser/gtk/bookmark_bar_gtk.cc
+++ b/chrome/browser/gtk/bookmark_bar_gtk.cc
@@ -690,7 +690,8 @@ bool BookmarkBarGtk::GetTabContentsSize(gfx::Size* size) {
}
TabContents* tab_contents = browser->GetSelectedTabContents();
if (!tab_contents) {
- NOTREACHED();
+ // It is possible to have a browser but no TabContents while under testing,
+ // so don't NOTREACHED() and error the program.
return false;
}
if (!tab_contents->view()) {
diff --git a/chrome/browser/gtk/bookmark_bar_gtk.h b/chrome/browser/gtk/bookmark_bar_gtk.h
index de0b8c1..df433dc 100644
--- a/chrome/browser/gtk/bookmark_bar_gtk.h
+++ b/chrome/browser/gtk/bookmark_bar_gtk.h
@@ -156,8 +156,9 @@ class BookmarkBarGtk : public AnimationDelegate,
// Queue a paint on the event box.
void PaintEventBox();
- // Finds the size of the current tab contents. If the size cannot be found,
- // DCHECKs and returns false. Otherwise, sets |size| to the correct value.
+ // Finds the size of the current tab contents, if it exists and sets |size|
+ // to the correct value. Returns false if there isn't a TabContents, a
+ // condition that can happen during testing.
bool GetTabContentsSize(gfx::Size* size);
// Makes the appropriate widget on the bookmark bar stop throbbing