summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-20 22:40:40 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-20 22:40:40 +0000
commit15e8abe105f4c2a08cd5dc51e95ec1791ac440f2 (patch)
tree7c5458d53be26517668ca9aa479b37ad0ad34d4f /chrome
parent6e83cb81e5e0c974a0782bc319e5a79ea0cca70b (diff)
downloadchromium_src-15e8abe105f4c2a08cd5dc51e95ec1791ac440f2.zip
chromium_src-15e8abe105f4c2a08cd5dc51e95ec1791ac440f2.tar.gz
chromium_src-15e8abe105f4c2a08cd5dc51e95ec1791ac440f2.tar.bz2
Revert a fix where I mistakenly assumed that numbers coming into
Browser::MoveContents() were content sizes instead of window sizes; this broke a unit test and is incorrect. Reopening the other bug; it seems like webkit is getting totally wrong numbers when asking for a window's size. BUG=1334628, git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1121 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/browser.cc7
-rw-r--r--chrome/browser/browser.h2
-rw-r--r--chrome/browser/views/constrained_window_impl_interactive_uitest.cc9
3 files changed, 8 insertions, 10 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 8015f26..2b2ee56 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -830,15 +830,14 @@ void Browser::CloseContents(TabContents* source) {
tabstrip_model_.CloseTabContentsAt(index);
}
-void Browser::MoveContents(TabContents* source, const gfx::Rect& content_pos) {
+void Browser::MoveContents(TabContents* source, const gfx::Rect& pos) {
if (GetType() != BrowserType::BROWSER) {
NOTREACHED() << "moving invalid browser type";
return;
}
- gfx::Rect window_pos = window_->GetBoundsForContentBounds(content_pos);
- ::SetWindowPos(GetTopLevelHWND(), NULL, window_pos.x(), window_pos.y(),
- window_pos.width(), window_pos.height(), 0);
+ ::SetWindowPos(GetTopLevelHWND(), NULL, pos.x(), pos.y(), pos.width(),
+ pos.height(), 0);
win_util::AdjustWindowToFit(GetTopLevelHWND());
}
diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h
index b2c29aa..49d5518 100644
--- a/chrome/browser/browser.h
+++ b/chrome/browser/browser.h
@@ -312,7 +312,7 @@ class Browser : public TabStripModelDelegate,
virtual void ActivateContents(TabContents* contents);
virtual void LoadingStateChanged(TabContents* source);
virtual void CloseContents(TabContents* source);
- virtual void MoveContents(TabContents* source, const gfx::Rect& content_pos);
+ virtual void MoveContents(TabContents* source, const gfx::Rect& pos);
virtual bool IsPopup(TabContents* source);
virtual void URLStarredChanged(TabContents* source, bool starred);
diff --git a/chrome/browser/views/constrained_window_impl_interactive_uitest.cc b/chrome/browser/views/constrained_window_impl_interactive_uitest.cc
index d7eff19..dac422e 100644
--- a/chrome/browser/views/constrained_window_impl_interactive_uitest.cc
+++ b/chrome/browser/views/constrained_window_impl_interactive_uitest.cc
@@ -47,9 +47,7 @@ class InteractiveConstrainedWindowTest : public UITest {
}
};
-// This test is disabled, see bug 1334628.
-TEST_F(InteractiveConstrainedWindowTest,
- DISABLED_UserActivatedResizeToLeavesSpaceForChrome) {
+TEST_F(InteractiveConstrainedWindowTest, TestOpenAndResizeTo) {
scoped_ptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
ASSERT_TRUE(browser.get());
@@ -99,8 +97,9 @@ TEST_F(InteractiveConstrainedWindowTest,
ASSERT_TRUE(popup_window->SimulateOSClick(
popup_link_point, ChromeViews::Event::EF_LEFT_BUTTON_DOWN));
- // No idea how to wait here other then sleeping.
- Sleep(1000);
+ // No idea how to wait here other then sleeping. This timeout used to be lower,
+ // then we started hitting it before it was done. :(
+ Sleep(5000);
// The actual content will be LESS than (200, 200) because resizeTo
// deals with a window's outer{Width,Height} instead of its