OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "apps/launcher.h" | 5 #include "apps/launcher.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1234 PlatformAppBrowserTest::SetUpOnMainThread(); | 1234 PlatformAppBrowserTest::SetUpOnMainThread(); |
1235 | 1235 |
1236 mock_user_manager_ = new chromeos::MockUserManager; | 1236 mock_user_manager_ = new chromeos::MockUserManager; |
1237 user_manager_enabler_.reset( | 1237 user_manager_enabler_.reset( |
1238 new chromeos::ScopedUserManagerEnabler(mock_user_manager_)); | 1238 new chromeos::ScopedUserManagerEnabler(mock_user_manager_)); |
1239 | 1239 |
1240 EXPECT_CALL(*mock_user_manager_, IsUserLoggedIn()) | 1240 EXPECT_CALL(*mock_user_manager_, IsUserLoggedIn()) |
1241 .WillRepeatedly(testing::Return(true)); | 1241 .WillRepeatedly(testing::Return(true)); |
1242 EXPECT_CALL(*mock_user_manager_, IsLoggedInAsKioskApp()) | 1242 EXPECT_CALL(*mock_user_manager_, IsLoggedInAsKioskApp()) |
1243 .WillRepeatedly(testing::Return(true)); | 1243 .WillRepeatedly(testing::Return(true)); |
| 1244 EXPECT_CALL(*mock_user_manager_, GetLoggedInUsers()) |
| 1245 .WillRepeatedly(testing::Invoke(mock_user_manager_, |
| 1246 &chromeos::MockUserManager::GetUsers)); |
1244 } | 1247 } |
1245 | 1248 |
1246 void TearDownOnMainThread() override { | 1249 void TearDownOnMainThread() override { |
1247 user_manager_enabler_.reset(); | 1250 user_manager_enabler_.reset(); |
1248 PlatformAppBrowserTest::TearDownOnMainThread(); | 1251 PlatformAppBrowserTest::TearDownOnMainThread(); |
1249 } | 1252 } |
1250 | 1253 |
1251 void TearDownInProcessBrowserTestFixture() override { | 1254 void TearDownInProcessBrowserTestFixture() override { |
1252 PlatformAppBrowserTest::TearDownInProcessBrowserTestFixture(); | 1255 PlatformAppBrowserTest::TearDownInProcessBrowserTestFixture(); |
1253 } | 1256 } |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1334 // Now check that the app window's default zoom, and actual zoom level, | 1337 // Now check that the app window's default zoom, and actual zoom level, |
1335 // have not been changed from the default. | 1338 // have not been changed from the default. |
1336 WebContents* web_contents = GetFirstAppWindowWebContents(); | 1339 WebContents* web_contents = GetFirstAppWindowWebContents(); |
1337 content::HostZoomMap* app_host_zoom_map = content::HostZoomMap::Get( | 1340 content::HostZoomMap* app_host_zoom_map = content::HostZoomMap::Get( |
1338 web_contents->GetSiteInstance()); | 1341 web_contents->GetSiteInstance()); |
1339 EXPECT_EQ(0, app_host_zoom_map->GetDefaultZoomLevel()); | 1342 EXPECT_EQ(0, app_host_zoom_map->GetDefaultZoomLevel()); |
1340 EXPECT_EQ(0, app_host_zoom_map->GetZoomLevel(web_contents)); | 1343 EXPECT_EQ(0, app_host_zoom_map->GetZoomLevel(web_contents)); |
1341 } | 1344 } |
1342 | 1345 |
1343 } // namespace extensions | 1346 } // namespace extensions |
OLD | NEW |