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

Side by Side Diff: ash/content/keyboard_overlay/keyboard_overlay_delegate_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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/content/keyboard_overlay/keyboard_overlay_delegate.h" 5 #include "ash/content/keyboard_overlay/keyboard_overlay_delegate.h"
6 6
7 #include "ash/common/shelf/wm_shelf.h" 7 #include "ash/common/shelf/wm_shelf.h"
8 #include "ash/public/cpp/shelf_types.h" 8 #include "ash/public/cpp/shelf_types.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/test/ash_test_base.h" 10 #include "ash/test/ash_test_base.h"
(...skipping 14 matching lines...) Expand all
25 ShelfAlignment shelf_alignment() const { return shelf_alignment_; } 25 ShelfAlignment shelf_alignment() const { return shelf_alignment_; }
26 26
27 private: 27 private:
28 ShelfAlignment shelf_alignment_; 28 ShelfAlignment shelf_alignment_;
29 29
30 DISALLOW_COPY_AND_ASSIGN(KeyboardOverlayDelegateTest); 30 DISALLOW_COPY_AND_ASSIGN(KeyboardOverlayDelegateTest);
31 }; 31 };
32 32
33 // Verifies we can show and close the widget for the overlay dialog. 33 // Verifies we can show and close the widget for the overlay dialog.
34 TEST_P(KeyboardOverlayDelegateTest, ShowAndClose) { 34 TEST_P(KeyboardOverlayDelegateTest, ShowAndClose) {
35 if (!SupportsMultipleDisplays())
36 return;
37
38 UpdateDisplay("500x400,300x200"); 35 UpdateDisplay("500x400,300x200");
39 GetPrimaryShelf()->SetAlignment(shelf_alignment()); 36 GetPrimaryShelf()->SetAlignment(shelf_alignment());
40 KeyboardOverlayDelegate delegate(base::ASCIIToUTF16("Title"), 37 KeyboardOverlayDelegate delegate(base::ASCIIToUTF16("Title"),
41 GURL("chrome://keyboardoverlay/")); 38 GURL("chrome://keyboardoverlay/"));
42 // Showing the dialog creates a widget. 39 // Showing the dialog creates a widget.
43 views::Widget* widget = delegate.Show(nullptr); 40 views::Widget* widget = delegate.Show(nullptr);
44 EXPECT_TRUE(widget); 41 EXPECT_TRUE(widget);
45 42
46 // The widget is on the primary root window. 43 // The widget is on the primary root window.
47 EXPECT_EQ(Shell::GetPrimaryRootWindow(), 44 EXPECT_EQ(Shell::GetPrimaryRootWindow(),
(...skipping 13 matching lines...) Expand all
61 58
62 // Tests run four times - for all possible values of shelf alignment 59 // Tests run four times - for all possible values of shelf alignment
63 INSTANTIATE_TEST_CASE_P(ShelfAlignmentAny, 60 INSTANTIATE_TEST_CASE_P(ShelfAlignmentAny,
64 KeyboardOverlayDelegateTest, 61 KeyboardOverlayDelegateTest,
65 testing::Values(SHELF_ALIGNMENT_BOTTOM, 62 testing::Values(SHELF_ALIGNMENT_BOTTOM,
66 SHELF_ALIGNMENT_LEFT, 63 SHELF_ALIGNMENT_LEFT,
67 SHELF_ALIGNMENT_RIGHT, 64 SHELF_ALIGNMENT_RIGHT,
68 SHELF_ALIGNMENT_BOTTOM_LOCKED)); 65 SHELF_ALIGNMENT_BOTTOM_LOCKED));
69 66
70 } // namespace ash 67 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/workspace/workspace_layout_manager_unittest.cc ('k') | ash/display/cursor_window_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698