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

Side by Side Diff: ash/mus/top_level_window_factory_unittest.cc

Issue 2653593004: chromeos: Remove AshTestBase::SupportsMultipleDisplays (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « ash/mus/test/wm_test_base.cc ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/test/ash_test.h" 5 #include "ash/common/test/ash_test.h"
6 #include "ash/common/wm_shell.h" 6 #include "ash/common/wm_shell.h"
7 #include "ash/common/wm_window.h" 7 #include "ash/common/wm_window.h"
8 #include "ash/mus/test/wm_test_base.h" 8 #include "ash/mus/test/wm_test_base.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/display/screen.h" 10 #include "ui/display/screen.h"
(...skipping 14 matching lines...) Expand all
25 std::unique_ptr<WindowOwner> window_owner = CreateToplevelTestWindow(); 25 std::unique_ptr<WindowOwner> window_owner = CreateToplevelTestWindow();
26 WmWindow* window = window_owner->window(); 26 WmWindow* window = window_owner->window();
27 window->SetFullscreen(true); 27 window->SetFullscreen(true);
28 WmWindow* root_window = WmShell::Get()->GetPrimaryRootWindow(); 28 WmWindow* root_window = WmShell::Get()->GetPrimaryRootWindow();
29 EXPECT_EQ(root_window->GetBounds(), window->GetBounds()); 29 EXPECT_EQ(root_window->GetBounds(), window->GetBounds());
30 } 30 }
31 31
32 using TopLevelWindowFactoryWmTest = mus::WmTestBase; 32 using TopLevelWindowFactoryWmTest = mus::WmTestBase;
33 33
34 TEST_F(TopLevelWindowFactoryWmTest, IsWindowShownInCorrectDisplay) { 34 TEST_F(TopLevelWindowFactoryWmTest, IsWindowShownInCorrectDisplay) {
35 if (!SupportsMultipleDisplays())
36 return;
37
38 UpdateDisplay("400x400,400x400"); 35 UpdateDisplay("400x400,400x400");
39 EXPECT_NE(GetPrimaryDisplay().id(), GetSecondaryDisplay().id()); 36 EXPECT_NE(GetPrimaryDisplay().id(), GetSecondaryDisplay().id());
40 37
41 std::unique_ptr<aura::Window> window_primary_display( 38 std::unique_ptr<aura::Window> window_primary_display(
42 CreateFullscreenTestWindow(GetPrimaryDisplay().id())); 39 CreateFullscreenTestWindow(GetPrimaryDisplay().id()));
43 std::unique_ptr<aura::Window> window_secondary_display( 40 std::unique_ptr<aura::Window> window_secondary_display(
44 CreateFullscreenTestWindow(GetSecondaryDisplay().id())); 41 CreateFullscreenTestWindow(GetSecondaryDisplay().id()));
45 42
46 EXPECT_EQ(GetPrimaryDisplay().id(), 43 EXPECT_EQ(GetPrimaryDisplay().id(),
47 GetDisplayId(window_primary_display.get())); 44 GetDisplayId(window_primary_display.get()));
48 EXPECT_EQ(GetSecondaryDisplay().id(), 45 EXPECT_EQ(GetSecondaryDisplay().id(),
49 GetDisplayId(window_secondary_display.get())); 46 GetDisplayId(window_secondary_display.get()));
50 } 47 }
51 48
52 } // namespace ash 49 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/test/wm_test_base.cc ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698