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

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

Issue 298883006: Rename NOTIFICATION_EXTENSION_INSTALLED to (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 <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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 ASSERT_TRUE(host); 723 ASSERT_TRUE(host);
724 chromeos::OobeUI* oobe_ui = host->GetOobeUI(); 724 chromeos::OobeUI* oobe_ui = host->GetOobeUI();
725 ASSERT_TRUE(oobe_ui); 725 ASSERT_TRUE(oobe_ui);
726 base::RunLoop run_loop; 726 base::RunLoop run_loop;
727 const bool oobe_ui_ready = oobe_ui->IsJSReady(run_loop.QuitClosure()); 727 const bool oobe_ui_ready = oobe_ui->IsJSReady(run_loop.QuitClosure());
728 if (!oobe_ui_ready) 728 if (!oobe_ui_ready)
729 run_loop.Run(); 729 run_loop.Run();
730 730
731 // Start listening for app/extension installation results. 731 // Start listening for app/extension installation results.
732 content::WindowedNotificationObserver hosted_app_observer( 732 content::WindowedNotificationObserver hosted_app_observer(
733 chrome::NOTIFICATION_EXTENSION_INSTALLED, 733 chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
734 base::Bind(DoesInstallSuccessReferToId, kHostedAppID)); 734 base::Bind(DoesInstallSuccessReferToId, kHostedAppID));
735 content::WindowedNotificationObserver extension_observer( 735 content::WindowedNotificationObserver extension_observer(
736 chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR, 736 chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
737 base::Bind(DoesInstallFailureReferToId, kGoodExtensionID)); 737 base::Bind(DoesInstallFailureReferToId, kGoodExtensionID));
738 738
739 // Start login into the device-local account. 739 // Start login into the device-local account.
740 host->StartSignInScreen(LoginScreenContext()); 740 host->StartSignInScreen(LoginScreenContext());
741 chromeos::ExistingUserController* controller = 741 chromeos::ExistingUserController* controller =
742 chromeos::ExistingUserController::current_controller(); 742 chromeos::ExistingUserController::current_controller();
743 ASSERT_TRUE(controller); 743 ASSERT_TRUE(controller);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 ASSERT_TRUE(host); 818 ASSERT_TRUE(host);
819 chromeos::OobeUI* oobe_ui = host->GetOobeUI(); 819 chromeos::OobeUI* oobe_ui = host->GetOobeUI();
820 ASSERT_TRUE(oobe_ui); 820 ASSERT_TRUE(oobe_ui);
821 base::RunLoop run_loop; 821 base::RunLoop run_loop;
822 const bool oobe_ui_ready = oobe_ui->IsJSReady(run_loop.QuitClosure()); 822 const bool oobe_ui_ready = oobe_ui->IsJSReady(run_loop.QuitClosure());
823 if (!oobe_ui_ready) 823 if (!oobe_ui_ready)
824 run_loop.Run(); 824 run_loop.Run();
825 825
826 // Start listening for app/extension installation results. 826 // Start listening for app/extension installation results.
827 content::WindowedNotificationObserver hosted_app_observer( 827 content::WindowedNotificationObserver hosted_app_observer(
828 chrome::NOTIFICATION_EXTENSION_INSTALLED, 828 chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
829 base::Bind(DoesInstallSuccessReferToId, kHostedAppID)); 829 base::Bind(DoesInstallSuccessReferToId, kHostedAppID));
830 content::WindowedNotificationObserver extension_observer( 830 content::WindowedNotificationObserver extension_observer(
831 chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR, 831 chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
832 base::Bind(DoesInstallFailureReferToId, kGoodExtensionID)); 832 base::Bind(DoesInstallFailureReferToId, kGoodExtensionID));
833 833
834 // Start login into the device-local account. 834 // Start login into the device-local account.
835 host->StartSignInScreen(LoginScreenContext()); 835 host->StartSignInScreen(LoginScreenContext());
836 chromeos::ExistingUserController* controller = 836 chromeos::ExistingUserController* controller =
837 chromeos::ExistingUserController::current_controller(); 837 chromeos::ExistingUserController::current_controller();
838 ASSERT_TRUE(controller); 838 ASSERT_TRUE(controller);
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 if (!IsSessionStarted()) { 1394 if (!IsSessionStarted()) {
1395 content::WindowedNotificationObserver(chrome::NOTIFICATION_SESSION_STARTED, 1395 content::WindowedNotificationObserver(chrome::NOTIFICATION_SESSION_STARTED,
1396 base::Bind(IsSessionStarted)).Wait(); 1396 base::Bind(IsSessionStarted)).Wait();
1397 } 1397 }
1398 } 1398 }
1399 1399
1400 INSTANTIATE_TEST_CASE_P(TermsOfServiceTestInstance, 1400 INSTANTIATE_TEST_CASE_P(TermsOfServiceTestInstance,
1401 TermsOfServiceTest, testing::Bool()); 1401 TermsOfServiceTest, testing::Bool());
1402 1402
1403 } // namespace policy 1403 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698