| Index: chrome/browser/ui/ash/shelf_browsertest.cc
|
| diff --git a/chrome/browser/ui/ash/shelf_browsertest.cc b/chrome/browser/ui/ash/shelf_browsertest.cc
|
| index 313fdef64b7b8022f8d05ac5c3b93a9e5be9ca83..37d82ab671bc82d7c87a7930f451fda59b32202a 100644
|
| --- a/chrome/browser/ui/ash/shelf_browsertest.cc
|
| +++ b/chrome/browser/ui/ash/shelf_browsertest.cc
|
| @@ -2,10 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "ash/root_window_controller.h"
|
| +#include "ash/shelf/shelf.h"
|
| #include "ash/shelf/shelf_layout_manager.h"
|
| -#include "ash/shell.h"
|
| -#include "ash/wm/workspace_controller.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/browser_window.h"
|
| @@ -17,25 +15,26 @@ typedef InProcessBrowserTest ShelfBrowserTest;
|
| // Confirm that a status bubble doesn't cause the shelf to darken.
|
| IN_PROC_BROWSER_TEST_F(ShelfBrowserTest, StatusBubble) {
|
| ash::ShelfLayoutManager* shelf =
|
| - ash::RootWindowController::ForShelf(
|
| - browser()->window()->GetNativeWindow())->GetShelfLayoutManager();
|
| + ash::Shelf::ForWindow(browser()->window()->GetNativeWindow())
|
| + ->shelf_layout_manager();
|
| EXPECT_TRUE(shelf->IsVisible());
|
|
|
| // Ensure that the browser abuts the shelf.
|
| - const gfx::Rect old_bounds = browser()->window()->GetBounds();
|
| - const gfx::Rect new_bounds(
|
| - old_bounds.x(),
|
| - old_bounds.y(),
|
| - old_bounds.width(),
|
| - shelf->GetIdealBounds().y() - old_bounds.y());
|
| - browser()->window()->SetBounds(new_bounds);
|
| + gfx::Rect bounds = browser()->window()->GetBounds();
|
| + bounds.set_height(shelf->GetIdealBounds().y() - bounds.y());
|
| + browser()->window()->SetBounds(bounds);
|
| EXPECT_FALSE(shelf->window_overlaps_shelf());
|
|
|
| - // Show status, which will overlap the shelf by a pixel.
|
| + // Show status, which may overlap the shelf by a pixel.
|
| browser()->window()->GetStatusBubble()->SetStatus(
|
| base::UTF8ToUTF16("Dummy Status Text"));
|
| shelf->UpdateVisibilityState();
|
|
|
| // Ensure that status doesn't cause overlap.
|
| EXPECT_FALSE(shelf->window_overlaps_shelf());
|
| +
|
| + // Ensure that moving the browser slightly down does cause overlap.
|
| + bounds.Offset(0, 1);
|
| + browser()->window()->SetBounds(bounds);
|
| + EXPECT_TRUE(shelf->window_overlaps_shelf());
|
| }
|
|
|