Commit 9de47627 authored by Peter Kasting's avatar Peter Kasting Committed by Commit Bot

Enable disabled tests in c/b/ui/views/tabs/.

Bug: 331924, 603562, 626761, 837219
Change-Id: If2695993d98dc00168c367c3c171b99a96eb7bc5
Reviewed-on: https://chromium-review.googlesource.com/c/1351809
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarAllen Bauer <kylixrd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619736}
parent e576d650
...@@ -102,7 +102,8 @@ int BrowserFrame::GetMinimizeButtonOffset() const { ...@@ -102,7 +102,8 @@ int BrowserFrame::GetMinimizeButtonOffset() const {
return native_browser_frame_->GetMinimizeButtonOffset(); return native_browser_frame_->GetMinimizeButtonOffset();
} }
gfx::Rect BrowserFrame::GetBoundsForTabStrip(views::View* tabstrip) const { gfx::Rect BrowserFrame::GetBoundsForTabStrip(
const views::View* tabstrip) const {
// This can be invoked before |browser_frame_view_| has been set. // This can be invoked before |browser_frame_view_| has been set.
return browser_frame_view_ ? return browser_frame_view_ ?
browser_frame_view_->GetBoundsForTabStrip(tabstrip) : gfx::Rect(); browser_frame_view_->GetBoundsForTabStrip(tabstrip) : gfx::Rect();
......
...@@ -58,7 +58,7 @@ class BrowserFrame : public views::Widget, ...@@ -58,7 +58,7 @@ class BrowserFrame : public views::Widget,
// Retrieves the bounds, in non-client view coordinates for the specified // Retrieves the bounds, in non-client view coordinates for the specified
// TabStrip view. // TabStrip view.
gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const; gfx::Rect GetBoundsForTabStrip(const views::View* tabstrip) const;
// Returns the inset of the topmost view in the client view from the top of // Returns the inset of the topmost view in the client view from the top of
// the non-client view. The topmost view depends on the window type. The // the non-client view. The topmost view depends on the window type. The
......
...@@ -52,7 +52,7 @@ class BrowserNonClientFrameView : public views::NonClientFrameView, ...@@ -52,7 +52,7 @@ class BrowserNonClientFrameView : public views::NonClientFrameView,
// Retrieves the bounds, in non-client view coordinates within which the // Retrieves the bounds, in non-client view coordinates within which the
// TabStrip should be laid out. // TabStrip should be laid out.
virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const = 0; virtual gfx::Rect GetBoundsForTabStrip(const views::View* tabstrip) const = 0;
// Returns the inset of the topmost view in the client view from the top of // Returns the inset of the topmost view in the client view from the top of
// the non-client view. The topmost view depends on the window type. The // the non-client view. The topmost view depends on the window type. The
......
...@@ -222,7 +222,7 @@ BrowserNonClientFrameViewAsh::CreateInterfacePtrForTesting() { ...@@ -222,7 +222,7 @@ BrowserNonClientFrameViewAsh::CreateInterfacePtrForTesting() {
// BrowserNonClientFrameView: // BrowserNonClientFrameView:
gfx::Rect BrowserNonClientFrameViewAsh::GetBoundsForTabStrip( gfx::Rect BrowserNonClientFrameViewAsh::GetBoundsForTabStrip(
views::View* tabstrip) const { const views::View* tabstrip) const {
if (!tabstrip) if (!tabstrip)
return gfx::Rect(); return gfx::Rect();
......
...@@ -62,7 +62,7 @@ class BrowserNonClientFrameViewAsh ...@@ -62,7 +62,7 @@ class BrowserNonClientFrameViewAsh
ash::mojom::SplitViewObserverPtr CreateInterfacePtrForTesting(); ash::mojom::SplitViewObserverPtr CreateInterfacePtrForTesting();
// BrowserNonClientFrameView: // BrowserNonClientFrameView:
gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const override; gfx::Rect GetBoundsForTabStrip(const views::View* tabstrip) const override;
int GetTopInset(bool restored) const override; int GetTopInset(bool restored) const override;
int GetThemeBackgroundXInset() const override; int GetThemeBackgroundXInset() const override;
void UpdateThrobber(bool running) override; void UpdateThrobber(bool running) override;
......
...@@ -27,7 +27,7 @@ class BrowserNonClientFrameViewMac : public BrowserNonClientFrameView { ...@@ -27,7 +27,7 @@ class BrowserNonClientFrameViewMac : public BrowserNonClientFrameView {
// BrowserNonClientFrameView: // BrowserNonClientFrameView:
void OnFullscreenStateChanged() override; void OnFullscreenStateChanged() override;
bool CaptionButtonsOnLeadingEdge() const override; bool CaptionButtonsOnLeadingEdge() const override;
gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const override; gfx::Rect GetBoundsForTabStrip(const views::View* tabstrip) const override;
int GetTopInset(bool restored) const override; int GetTopInset(bool restored) const override;
int GetThemeBackgroundXInset() const override; int GetThemeBackgroundXInset() const override;
void UpdateFullscreenTopUI(bool needs_check_tab_fullscreen) override; void UpdateFullscreenTopUI(bool needs_check_tab_fullscreen) override;
......
...@@ -108,7 +108,7 @@ bool BrowserNonClientFrameViewMac::CaptionButtonsOnLeadingEdge() const { ...@@ -108,7 +108,7 @@ bool BrowserNonClientFrameViewMac::CaptionButtonsOnLeadingEdge() const {
} }
gfx::Rect BrowserNonClientFrameViewMac::GetBoundsForTabStrip( gfx::Rect BrowserNonClientFrameViewMac::GetBoundsForTabStrip(
views::View* tabstrip) const { const views::View* tabstrip) const {
// TODO(weili): In the future, we should hide the title bar, and show the // TODO(weili): In the future, we should hide the title bar, and show the
// tab strip directly under the menu bar. For now, just lay our content // tab strip directly under the menu bar. For now, just lay our content
// under the native title bar. Use the default title bar height to avoid // under the native title bar. Use the default title bar height to avoid
......
...@@ -183,6 +183,7 @@ class BrowserView : public BrowserWindow, ...@@ -183,6 +183,7 @@ class BrowserView : public BrowserWindow,
// Accessor for the TabStrip. // Accessor for the TabStrip.
TabStrip* tabstrip() { return tabstrip_; } TabStrip* tabstrip() { return tabstrip_; }
const TabStrip* tabstrip() const { return tabstrip_; }
// Accessor for the Toolbar. // Accessor for the Toolbar.
ToolbarView* toolbar() { return toolbar_; } ToolbarView* toolbar() { return toolbar_; }
......
...@@ -151,7 +151,7 @@ bool GlassBrowserFrameView::CaptionButtonsOnLeadingEdge() const { ...@@ -151,7 +151,7 @@ bool GlassBrowserFrameView::CaptionButtonsOnLeadingEdge() const {
} }
gfx::Rect GlassBrowserFrameView::GetBoundsForTabStrip( gfx::Rect GlassBrowserFrameView::GetBoundsForTabStrip(
views::View* tabstrip) const { const views::View* tabstrip) const {
const int x = CaptionButtonsOnLeadingEdge() const int x = CaptionButtonsOnLeadingEdge()
? (width() - frame()->GetMinimizeButtonOffset()) ? (width() - frame()->GetMinimizeButtonOffset())
: 0; : 0;
...@@ -223,7 +223,7 @@ gfx::Size GlassBrowserFrameView::GetMinimumSize() const { ...@@ -223,7 +223,7 @@ gfx::Size GlassBrowserFrameView::GetMinimumSize() const {
// Ensure that the minimum width is enough to hold a min-width tab strip. // Ensure that the minimum width is enough to hold a min-width tab strip.
if (browser_view()->IsTabStripVisible()) { if (browser_view()->IsTabStripVisible()) {
TabStrip* tabstrip = browser_view()->tabstrip(); const TabStrip* tabstrip = browser_view()->tabstrip();
int min_tabstrip_width = tabstrip->GetMinimumSize().width(); int min_tabstrip_width = tabstrip->GetMinimumSize().width();
int min_tabstrip_area_width = int min_tabstrip_area_width =
width() - GetBoundsForTabStrip(tabstrip).width() + min_tabstrip_width; width() - GetBoundsForTabStrip(tabstrip).width() + min_tabstrip_width;
......
...@@ -35,7 +35,7 @@ class GlassBrowserFrameView : public BrowserNonClientFrameView, ...@@ -35,7 +35,7 @@ class GlassBrowserFrameView : public BrowserNonClientFrameView,
// BrowserNonClientFrameView: // BrowserNonClientFrameView:
bool CaptionButtonsOnLeadingEdge() const override; bool CaptionButtonsOnLeadingEdge() const override;
gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const override; gfx::Rect GetBoundsForTabStrip(const views::View* tabstrip) const override;
int GetTopInset(bool restored) const override; int GetTopInset(bool restored) const override;
int GetThemeBackgroundXInset() const override; int GetThemeBackgroundXInset() const override;
bool HasVisibleBackgroundTabShapes(ActiveState active_state) const override; bool HasVisibleBackgroundTabShapes(ActiveState active_state) const override;
......
...@@ -204,7 +204,7 @@ void OpaqueBrowserFrameView::InitViews() { ...@@ -204,7 +204,7 @@ void OpaqueBrowserFrameView::InitViews() {
// OpaqueBrowserFrameView, BrowserNonClientFrameView implementation: // OpaqueBrowserFrameView, BrowserNonClientFrameView implementation:
gfx::Rect OpaqueBrowserFrameView::GetBoundsForTabStrip( gfx::Rect OpaqueBrowserFrameView::GetBoundsForTabStrip(
views::View* tabstrip) const { const views::View* tabstrip) const {
if (!tabstrip) if (!tabstrip)
return gfx::Rect(); return gfx::Rect();
......
...@@ -58,7 +58,7 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView, ...@@ -58,7 +58,7 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
void InitViews(); void InitViews();
// BrowserNonClientFrameView: // BrowserNonClientFrameView:
gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const override; gfx::Rect GetBoundsForTabStrip(const views::View* tabstrip) const override;
int GetTopInset(bool restored) const override; int GetTopInset(bool restored) const override;
int GetThemeBackgroundXInset() const override; int GetThemeBackgroundXInset() const override;
void UpdateThrobber(bool running) override; void UpdateThrobber(bool running) override;
......
...@@ -38,9 +38,9 @@ class TabDragControllerTest : public InProcessBrowserTest { ...@@ -38,9 +38,9 @@ class TabDragControllerTest : public InProcessBrowserTest {
// the tabs in |browser|. // the tabs in |browser|.
void AddTabAndResetBrowser(Browser* browser); void AddTabAndResetBrowser(Browser* browser);
// Creates a new Browser and resizes |browser()| and the new browser to be // Creates a new Browser and resizes browser() and the new browser to be side
// side by side. // by side.
Browser* CreateAnotherWindowBrowserAndRelayout(); Browser* CreateAnotherBrowserAndResize();
void SetWindowFinderForTabStrip(TabStrip* tab_strip, void SetWindowFinderForTabStrip(TabStrip* tab_strip,
std::unique_ptr<WindowFinder> window_finder); std::unique_ptr<WindowFinder> window_finder);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment