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

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

Issue 224113005: Eliminate ash::internal namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #include "apps/app_window_registry.h" 8 #include "apps/app_window_registry.h"
9 #include "apps/ui/native_app_window.h" 9 #include "apps/ui/native_app_window.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 content::WindowedNotificationObserver(chrome::NOTIFICATION_SESSION_STARTED, 1089 content::WindowedNotificationObserver(chrome::NOTIFICATION_SESSION_STARTED,
1090 base::Bind(IsSessionStarted)).Wait(); 1090 base::Bind(IsSessionStarted)).Wait();
1091 1091
1092 Profile* profile = GetProfileForTest(); 1092 Profile* profile = GetProfileForTest();
1093 ASSERT_TRUE(profile); 1093 ASSERT_TRUE(profile);
1094 apps::AppWindowRegistry* app_window_registry = 1094 apps::AppWindowRegistry* app_window_registry =
1095 apps::AppWindowRegistry::Get(profile); 1095 apps::AppWindowRegistry::Get(profile);
1096 app_window_registry->AddObserver(this); 1096 app_window_registry->AddObserver(this);
1097 1097
1098 // Verify that the logout confirmation dialog is not showing. 1098 // Verify that the logout confirmation dialog is not showing.
1099 ash::internal::LogoutConfirmationController* logout_confirmation_controller = 1099 ash::LogoutConfirmationController* logout_confirmation_controller =
1100 ash::Shell::GetInstance()->logout_confirmation_controller(); 1100 ash::Shell::GetInstance()->logout_confirmation_controller();
1101 ASSERT_TRUE(logout_confirmation_controller); 1101 ASSERT_TRUE(logout_confirmation_controller);
1102 EXPECT_FALSE(logout_confirmation_controller->dialog_for_testing()); 1102 EXPECT_FALSE(logout_confirmation_controller->dialog_for_testing());
1103 1103
1104 // Remove policy that allows only explicitly whitelisted apps to be installed 1104 // Remove policy that allows only explicitly whitelisted apps to be installed
1105 // in a public session. 1105 // in a public session.
1106 extensions::ExtensionSystem* extension_system = 1106 extensions::ExtensionSystem* extension_system =
1107 extensions::ExtensionSystem::Get(profile); 1107 extensions::ExtensionSystem::Get(profile);
1108 ASSERT_TRUE(extension_system); 1108 ASSERT_TRUE(extension_system);
1109 extension_system->management_policy()->UnregisterAllProviders(); 1109 extension_system->management_policy()->UnregisterAllProviders();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 browser_window = second_browser->window(); 1189 browser_window = second_browser->window();
1190 ASSERT_TRUE(browser_window); 1190 ASSERT_TRUE(browser_window);
1191 run_loop_.reset(new base::RunLoop); 1191 run_loop_.reset(new base::RunLoop);
1192 browser_window->Close(); 1192 browser_window->Close();
1193 browser_window = NULL; 1193 browser_window = NULL;
1194 run_loop_->Run(); 1194 run_loop_->Run();
1195 second_browser = NULL; 1195 second_browser = NULL;
1196 EXPECT_TRUE(browser_list->empty()); 1196 EXPECT_TRUE(browser_list->empty());
1197 1197
1198 // Verify that the logout confirmation dialog is showing. 1198 // Verify that the logout confirmation dialog is showing.
1199 ash::internal::LogoutConfirmationDialog* dialog = 1199 ash::LogoutConfirmationDialog* dialog =
1200 logout_confirmation_controller->dialog_for_testing(); 1200 logout_confirmation_controller->dialog_for_testing();
1201 ASSERT_TRUE(dialog); 1201 ASSERT_TRUE(dialog);
1202 1202
1203 // Deny the logout. 1203 // Deny the logout.
1204 dialog->GetWidget()->Close(); 1204 dialog->GetWidget()->Close();
1205 dialog = NULL; 1205 dialog = NULL;
1206 base::RunLoop().RunUntilIdle(); 1206 base::RunLoop().RunUntilIdle();
1207 1207
1208 // Verify that the logout confirmation dialog is no longer showing. 1208 // Verify that the logout confirmation dialog is no longer showing.
1209 EXPECT_FALSE(logout_confirmation_controller->dialog_for_testing()); 1209 EXPECT_FALSE(logout_confirmation_controller->dialog_for_testing());
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 if (!IsSessionStarted()) { 1388 if (!IsSessionStarted()) {
1389 content::WindowedNotificationObserver(chrome::NOTIFICATION_SESSION_STARTED, 1389 content::WindowedNotificationObserver(chrome::NOTIFICATION_SESSION_STARTED,
1390 base::Bind(IsSessionStarted)).Wait(); 1390 base::Bind(IsSessionStarted)).Wait();
1391 } 1391 }
1392 } 1392 }
1393 1393
1394 INSTANTIATE_TEST_CASE_P(TermsOfServiceTestInstance, 1394 INSTANTIATE_TEST_CASE_P(TermsOfServiceTestInstance,
1395 TermsOfServiceTest, testing::Bool()); 1395 TermsOfServiceTest, testing::Bool());
1396 1396
1397 } // namespace policy 1397 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698