Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: ash/system/web_notification/web_notification_tray_unittest.cc

Issue 2248773002: Use MD-ash's auto hide behavior for arc++ windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/common/system/web_notification/web_notification_tray.h" 5 #include "ash/common/system/web_notification/web_notification_tray.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/shelf/wm_shelf.h" 10 #include "ash/common/shelf/wm_shelf.h"
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->GetAutoHideState()); 413 EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->GetAutoHideState());
414 int bottom_auto_hidden = GetPopupWorkAreaBottom(); 414 int bottom_auto_hidden = GetPopupWorkAreaBottom();
415 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER); 415 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
416 416
417 // Put |widget| into fullscreen without forcing the shelf to hide. Currently, 417 // Put |widget| into fullscreen without forcing the shelf to hide. Currently,
418 // this is used by immersive fullscreen and forces the shelf to be auto 418 // this is used by immersive fullscreen and forces the shelf to be auto
419 // hidden. 419 // hidden.
420 WmLookup::Get() 420 WmLookup::Get()
421 ->GetWindowForWidget(widget.get()) 421 ->GetWindowForWidget(widget.get())
422 ->GetWindowState() 422 ->GetWindowState()
423 ->set_hide_shelf_when_fullscreen(false); 423 ->set_shelf_mode_in_fullscreen(
424 ash::wm::WindowState::SHELF_AUTO_HIDE_VISIBLE);
424 widget->SetFullscreen(true); 425 widget->SetFullscreen(true);
425 RunAllPendingInMessageLoop(); 426 RunAllPendingInMessageLoop();
426 427
427 // The work area for auto-hidden status of fullscreen is a bit larger 428 // The work area for auto-hidden status of fullscreen is a bit larger
428 // since it doesn't even have the 3-pixel width. 429 // since it doesn't even have the 3-pixel width.
429 EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->GetAutoHideState()); 430 EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->GetAutoHideState());
430 int bottom_fullscreen_hidden = GetPopupWorkAreaBottom(); 431 int bottom_fullscreen_hidden = GetPopupWorkAreaBottom();
431 EXPECT_EQ(bottom_auto_hidden, bottom_fullscreen_hidden); 432 EXPECT_EQ(bottom_auto_hidden, bottom_fullscreen_hidden);
432 433
433 // Move the mouse cursor at the bottom, which shows the shelf. 434 // Move the mouse cursor at the bottom, which shows the shelf.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 ui::ET_TOUCH_RELEASED, out_of_bounds, touch_id, 523 ui::ET_TOUCH_RELEASED, out_of_bounds, touch_id,
523 move.time_stamp() + base::TimeDelta::FromMilliseconds(50)); 524 move.time_stamp() + base::TimeDelta::FromMilliseconds(50));
524 generator.Dispatch(&release); 525 generator.Dispatch(&release);
525 EXPECT_FALSE(tray->draw_background_as_active()); 526 EXPECT_FALSE(tray->draw_background_as_active());
526 EXPECT_FALSE(tray->IsMessageCenterBubbleVisible()); 527 EXPECT_FALSE(tray->IsMessageCenterBubbleVisible());
527 } 528 }
528 529
529 #endif // OS_CHROMEOS 530 #endif // OS_CHROMEOS
530 531
531 } // namespace ash 532 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698