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

Side by Side Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_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, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include <utility> 6 #include <utility>
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 25 matching lines...) Expand all
36 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerTest); 36 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerTest);
37 }; 37 };
38 38
39 IN_PROC_BROWSER_TEST_F(UserCloudPolicyManagerTest, StartSession) { 39 IN_PROC_BROWSER_TEST_F(UserCloudPolicyManagerTest, StartSession) {
40 const char* const kStartupURLs[] = {"chrome://policy", "chrome://about"}; 40 const char* const kStartupURLs[] = {"chrome://policy", "chrome://about"};
41 41
42 SkipToLoginScreen(); 42 SkipToLoginScreen();
43 LogIn(kAccountId, kAccountPassword); 43 LogIn(kAccountId, kAccountPassword);
44 44
45 // Check that the startup pages specified in policy were opened. 45 // Check that the startup pages specified in policy were opened.
46 BrowserList* browser_list = 46 BrowserList* browser_list = BrowserList::GetInstance();
47 BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_ASH);
48 EXPECT_EQ(1U, browser_list->size()); 47 EXPECT_EQ(1U, browser_list->size());
49 Browser* browser = browser_list->get(0); 48 Browser* browser = browser_list->get(0);
50 ASSERT_TRUE(browser); 49 ASSERT_TRUE(browser);
51 50
52 TabStripModel* tabs = browser->tab_strip_model(); 51 TabStripModel* tabs = browser->tab_strip_model();
53 ASSERT_TRUE(tabs); 52 ASSERT_TRUE(tabs);
54 const int expected_tab_count = static_cast<int>(arraysize(kStartupURLs)); 53 const int expected_tab_count = static_cast<int>(arraysize(kStartupURLs));
55 EXPECT_EQ(expected_tab_count, tabs->count()); 54 EXPECT_EQ(expected_tab_count, tabs->count());
56 for (int i = 0; i < expected_tab_count && i < tabs->count(); ++i) { 55 for (int i = 0; i < expected_tab_count && i < tabs->count(); ++i) {
57 EXPECT_EQ(GURL(kStartupURLs[i]), 56 EXPECT_EQ(GURL(kStartupURLs[i]),
58 tabs->GetWebContentsAt(i)->GetVisibleURL()); 57 tabs->GetWebContentsAt(i)->GetVisibleURL());
59 } 58 }
60 } 59 }
61 60
62 } // namespace policy 61 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698