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

Side by Side Diff: chrome/browser/chromeos/policy/force_maximize_on_first_run_chromeos_browsertest.cc

Issue 1637943003: Remove HostDesktopType from BrowserList::GetInstance() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screen-wrapper-land
Patch Set: mac2 Created 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <string> 5 #include <string>
6 6
7 #include "ash/display/display_manager.h" 7 #include "ash/display/display_manager.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/test/display_manager_test_api.h" 9 #include "ash/test/display_manager_test_api.h"
10 #include "ash/wm/window_positioner.h" 10 #include "ash/wm/window_positioner.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 private: 56 private:
57 DISALLOW_COPY_AND_ASSIGN(ForceMaximizeOnFirstRunTest); 57 DISALLOW_COPY_AND_ASSIGN(ForceMaximizeOnFirstRunTest);
58 }; 58 };
59 59
60 IN_PROC_BROWSER_TEST_F(ForceMaximizeOnFirstRunTest, PRE_TwoRuns) { 60 IN_PROC_BROWSER_TEST_F(ForceMaximizeOnFirstRunTest, PRE_TwoRuns) {
61 SetUpResolution(); 61 SetUpResolution();
62 SkipToLoginScreen(); 62 SkipToLoginScreen();
63 LogIn(kAccountId, kAccountPassword); 63 LogIn(kAccountId, kAccountPassword);
64 64
65 // Check that the first browser window is maximized. 65 // Check that the first browser window is maximized.
66 const BrowserList* const browser_list = 66 const BrowserList* const browser_list = BrowserList::GetInstance();
67 BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_ASH);
68 EXPECT_EQ(1U, browser_list->size()); 67 EXPECT_EQ(1U, browser_list->size());
69 const Browser* const browser = browser_list->get(0); 68 const Browser* const browser = browser_list->get(0);
70 ASSERT_TRUE(browser); 69 ASSERT_TRUE(browser);
71 EXPECT_TRUE(browser->window()->IsMaximized()); 70 EXPECT_TRUE(browser->window()->IsMaximized());
72 71
73 // Un-maximize the window as its state will be carried forward to the next 72 // Un-maximize the window as its state will be carried forward to the next
74 // opened window. 73 // opened window.
75 browser->window()->Restore(); 74 browser->window()->Restore();
76 EXPECT_FALSE(browser->window()->IsMaximized()); 75 EXPECT_FALSE(browser->window()->IsMaximized());
77 76
(...skipping 25 matching lines...) Expand all
103 102
104 private: 103 private:
105 DISALLOW_COPY_AND_ASSIGN(ForceMaximizePolicyFalseTest); 104 DISALLOW_COPY_AND_ASSIGN(ForceMaximizePolicyFalseTest);
106 }; 105 };
107 106
108 IN_PROC_BROWSER_TEST_F(ForceMaximizePolicyFalseTest, GeneralFirstRun) { 107 IN_PROC_BROWSER_TEST_F(ForceMaximizePolicyFalseTest, GeneralFirstRun) {
109 SetUpResolution(); 108 SetUpResolution();
110 SkipToLoginScreen(); 109 SkipToLoginScreen();
111 LogIn(kAccountId, kAccountPassword); 110 LogIn(kAccountId, kAccountPassword);
112 111
113 const BrowserList* const browser_list = 112 const BrowserList* const browser_list = BrowserList::GetInstance();
114 BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_ASH);
115 EXPECT_EQ(1U, browser_list->size()); 113 EXPECT_EQ(1U, browser_list->size());
116 const Browser* const browser = browser_list->get(0); 114 const Browser* const browser = browser_list->get(0);
117 ASSERT_TRUE(browser); 115 ASSERT_TRUE(browser);
118 EXPECT_FALSE(browser->window()->IsMaximized()); 116 EXPECT_FALSE(browser->window()->IsMaximized());
119 } 117 }
120 118
121 } // namespace policy 119 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698