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

Unified Diff: ash/app_list/app_list_presenter_delegate_unittest.cc

Issue 2803933003: Adds ash_mus_unittests to FYI bot (Closed)
Patch Set: feedback Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/common/test/ash_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/app_list/app_list_presenter_delegate_unittest.cc
diff --git a/ash/app_list/app_list_presenter_delegate_unittest.cc b/ash/app_list/app_list_presenter_delegate_unittest.cc
index 3844f22bbc0a86842e9f78e86f546046466fabcc..1f8b7161b7b5d5506e348df1364ea506273e5333 100644
--- a/ash/app_list/app_list_presenter_delegate_unittest.cc
+++ b/ash/app_list/app_list_presenter_delegate_unittest.cc
@@ -15,10 +15,18 @@
#include "ui/app_list/views/app_list_view.h"
#include "ui/aura/test/test_windows.h"
#include "ui/aura/window.h"
-#include "ui/display/manager/display_manager.h"
+#include "ui/display/display.h"
+#include "ui/display/screen.h"
#include "ui/events/test/event_generator.h"
namespace ash {
+namespace {
+
+int64_t GetPrimaryDisplayId() {
+ return display::Screen::GetScreen()->GetPrimaryDisplay().id();
+}
+
+} // namespace
class AppListPresenterDelegateTest : public test::AshTestBase {
public:
@@ -45,7 +53,7 @@ class AppListPresenterDelegateTest : public test::AshTestBase {
// Tests that app launcher hides when focus moves to a normal window.
TEST_F(AppListPresenterDelegateTest, HideOnFocusOut) {
- app_list_presenter_impl()->Show(display_manager()->first_display_id());
+ app_list_presenter_impl()->Show(GetPrimaryDisplayId());
EXPECT_TRUE(app_list_presenter_impl()->GetTargetVisibility());
std::unique_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
@@ -58,7 +66,7 @@ TEST_F(AppListPresenterDelegateTest, HideOnFocusOut) {
// window in kShellWindowId_AppListContainer.
TEST_F(AppListPresenterDelegateTest,
RemainVisibleWhenFocusingToApplistContainer) {
- app_list_presenter_impl()->Show(display_manager()->first_display_id());
+ app_list_presenter_impl()->Show(GetPrimaryDisplayId());
EXPECT_TRUE(app_list_presenter_impl()->GetTargetVisibility());
aura::Window* applist_container = Shell::GetContainer(
@@ -72,7 +80,7 @@ TEST_F(AppListPresenterDelegateTest,
// Tests that clicking outside the app-list bubble closes it.
TEST_F(AppListPresenterDelegateTest, ClickOutsideBubbleClosesBubble) {
- app_list_presenter_impl()->Show(display_manager()->first_display_id());
+ app_list_presenter_impl()->Show(GetPrimaryDisplayId());
aura::Window* app_window = app_list_presenter_impl()->GetWindow();
ASSERT_TRUE(app_window);
ui::test::EventGenerator& generator = GetEventGenerator();
@@ -93,7 +101,7 @@ TEST_F(AppListPresenterDelegateTest, ClickOutsideBubbleClosesBubble) {
// Tests that clicking outside the app-list bubble closes it.
TEST_F(AppListPresenterDelegateTest, TapOutsideBubbleClosesBubble) {
- app_list_presenter_impl()->Show(display_manager()->first_display_id());
+ app_list_presenter_impl()->Show(GetPrimaryDisplayId());
aura::Window* app_window = app_list_presenter_impl()->GetWindow();
ASSERT_TRUE(app_window);
@@ -140,7 +148,7 @@ TEST_F(AppListPresenterDelegateTest, TinyDisplay) {
// Set up a screen with a tiny display (height smaller than the app list).
UpdateDisplay("400x300");
- app_list_presenter_impl()->Show(display_manager()->first_display_id());
+ app_list_presenter_impl()->Show(GetPrimaryDisplayId());
EXPECT_TRUE(app_list_presenter_impl()->GetTargetVisibility());
// The top of the app list should be on-screen (even if the bottom is not).
« no previous file with comments | « no previous file | ash/common/test/ash_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698