| 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 f39d951ffce9ccee6833d4c8918dedb85e257cb1..3d69aaa9c67cc16f66bfc1babea6c20035559e6f 100644
|
| --- a/chrome/browser/ui/ash/shelf_browsertest.cc
|
| +++ b/chrome/browser/ui/ash/shelf_browsertest.cc
|
| @@ -5,13 +5,17 @@
|
| #include "ash/common/shelf/shelf_layout_manager.h"
|
| #include "ash/common/shelf/wm_shelf.h"
|
| #include "ash/common/wm_window.h"
|
| +#include "base/command_line.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/browser_window.h"
|
| #include "chrome/browser/ui/status_bubble.h"
|
| +#include "chrome/common/chrome_switches.h"
|
| #include "chrome/test/base/in_process_browser_test.h"
|
| +#include "chromeos/chromeos_switches.h"
|
| +#include "components/user_manager/user_names.h"
|
|
|
| -typedef InProcessBrowserTest ShelfBrowserTest;
|
| +using ShelfBrowserTest = InProcessBrowserTest;
|
|
|
| // Confirm that a status bubble doesn't cause the shelf to darken.
|
| IN_PROC_BROWSER_TEST_F(ShelfBrowserTest, StatusBubble) {
|
| @@ -40,3 +44,23 @@ IN_PROC_BROWSER_TEST_F(ShelfBrowserTest, StatusBubble) {
|
| browser()->window()->SetBounds(bounds);
|
| EXPECT_TRUE(shelf_layout_manager->window_overlaps_shelf());
|
| }
|
| +
|
| +class ShelfGuestSessionBrowserTest : public InProcessBrowserTest {
|
| + protected:
|
| + void SetUpCommandLine(base::CommandLine* command_line) override {
|
| + command_line->AppendSwitch(chromeos::switches::kGuestSession);
|
| + command_line->AppendSwitch(::switches::kIncognito);
|
| + command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "hash");
|
| + command_line->AppendSwitchASCII(
|
| + chromeos::switches::kLoginUser,
|
| + user_manager::GuestAccountId().GetUserEmail());
|
| + }
|
| +};
|
| +
|
| +// Tests that in guest session, shelf alignment could be initialized to bottom
|
| +// aligned, instead of bottom locked (crbug.com/699661).
|
| +IN_PROC_BROWSER_TEST_F(ShelfGuestSessionBrowserTest, ShelfAlignment) {
|
| + ash::WmShelf* shelf = ash::WmShelf::ForWindow(
|
| + ash::WmWindow::Get(browser()->window()->GetNativeWindow()));
|
| + EXPECT_EQ(ash::SHELF_ALIGNMENT_BOTTOM, shelf->alignment());
|
| +}
|
|
|