summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-04 20:30:00 +0000
committerfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-04 20:30:00 +0000
commit550a2a688863effa5053fe426d4711d6537866bc (patch)
tree75829dbb6da399b2ab5fbb3f8a26658e5bcf94d7 /chrome
parentccb898ec6d8ef73ea91ced8b96a5834d2d7a9c3b (diff)
downloadchromium_src-550a2a688863effa5053fe426d4711d6537866bc.zip
chromium_src-550a2a688863effa5053fe426d4711d6537866bc.tar.gz
chromium_src-550a2a688863effa5053fe426d4711d6537866bc.tar.bz2
Fixing issue 1343052: a regression where the Find box moves up when you open a new tab and close it again.
This is because during a TabClosingAt call, we end up calling ShowTabContents(NULL) which leads to ShelfVisibilityChangedImpl(NULL). Because the parameter current_tab is NULL, we end up removing the BookmarkBarView from the RootView (only to add it back a little too late), the Find window thinks there is no BookmarkBar and hence moves up a bit. I am also enabling the disabled UI test I wrote for this, since it should now pass. BUG=1343052 TEST=Covered by UI test. Review URL: http://codereview.chromium.org/441 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1727 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/find_in_page_controller_uitest.cc3
-rw-r--r--chrome/browser/vista_frame.cc2
-rw-r--r--chrome/browser/xp_frame.cc2
3 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/find_in_page_controller_uitest.cc b/chrome/browser/find_in_page_controller_uitest.cc
index 821cdfe..be0da8e 100644
--- a/chrome/browser/find_in_page_controller_uitest.cc
+++ b/chrome/browser/find_in_page_controller_uitest.cc
@@ -122,7 +122,7 @@ TEST_F(FindInPageControllerTest, FindEnoughMatches_Issue1341577) {
// The find window should not change its location just because we open and close
// a new tab.
-TEST_F(FindInPageControllerTest, DISABLED_FindMovesOnTabClose_Issue1343052) {
+TEST_F(FindInPageControllerTest, FindMovesOnTabClose_Issue1343052) {
TestServer server(L"chrome/test/data");
GURL url = server.TestServerPageW(kFramePage);
@@ -159,6 +159,7 @@ TEST_F(FindInPageControllerTest, DISABLED_FindMovesOnTabClose_Issue1343052) {
// Now reset the bookmarks bar state and try the same again.
browser->ApplyAccelerator(IDC_SHOW_BOOKMARKS_BAR);
+ Sleep(kWaitForActionMsec);
// Bookmark bar has moved, reset our coordinates.
EXPECT_TRUE(tabA->GetFindWindowLocation(&x, &y));
diff --git a/chrome/browser/vista_frame.cc b/chrome/browser/vista_frame.cc
index c1c73ac..64bf4f8 100644
--- a/chrome/browser/vista_frame.cc
+++ b/chrome/browser/vista_frame.cc
@@ -1597,7 +1597,7 @@ void VistaFrame::ShelfVisibilityChangedImpl(TabContents* current_tab) {
changed |= UpdateChildViewAndLayout(new_info_bar, &info_bar_view_);
ChromeViews::View* new_bookmark_bar_view = NULL;
- if (SupportsBookmarkBar() && current_tab)
+ if (SupportsBookmarkBar())
new_bookmark_bar_view = GetBookmarkBarView();
changed |= UpdateChildViewAndLayout(new_bookmark_bar_view,
&active_bookmark_bar_);
diff --git a/chrome/browser/xp_frame.cc b/chrome/browser/xp_frame.cc
index cba5906..872acac 100644
--- a/chrome/browser/xp_frame.cc
+++ b/chrome/browser/xp_frame.cc
@@ -2483,7 +2483,7 @@ void XPFrame::ShelfVisibilityChangedImpl(TabContents* current_tab) {
changed |= UpdateChildViewAndLayout(new_info_bar, &info_bar_view_);
ChromeViews::View* new_bookmark_bar_view = NULL;
- if (SupportsBookmarkBar() && current_tab)
+ if (SupportsBookmarkBar())
new_bookmark_bar_view = GetBookmarkBarView();
changed |= UpdateChildViewAndLayout(new_bookmark_bar_view,
&active_bookmark_bar_);