summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
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