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

Side by Side Diff: chrome/browser/chromeos/login/kiosk_browsertest.cc

Issue 118733002: Added merge session request throttle for XHR requests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/merge_session_load_page.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "apps/shell_window.h" 5 #include "apps/shell_window.h"
6 #include "apps/shell_window_registry.h" 6 #include "apps/shell_window_registry.h"
7 #include "apps/ui/native_app_window.h" 7 #include "apps/ui/native_app_window.h"
8 #include "ash/desktop_background/desktop_background_controller.h" 8 #include "ash/desktop_background/desktop_background_controller.h"
9 #include "ash/desktop_background/desktop_background_controller_observer.h" 9 #include "ash/desktop_background/desktop_background_controller_observer.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 GaiaUrls* gaia_urls = GaiaUrls::GetInstance(); 730 GaiaUrls* gaia_urls = GaiaUrls::GetInstance();
731 731
732 // This token satisfies the userinfo.email request from 732 // This token satisfies the userinfo.email request from
733 // DeviceOAuth2TokenService used in token validation. 733 // DeviceOAuth2TokenService used in token validation.
734 FakeGaia::AccessTokenInfo userinfo_token_info; 734 FakeGaia::AccessTokenInfo userinfo_token_info;
735 userinfo_token_info.token = kTestUserinfoToken; 735 userinfo_token_info.token = kTestUserinfoToken;
736 userinfo_token_info.scopes.insert( 736 userinfo_token_info.scopes.insert(
737 "https://www.googleapis.com/auth/userinfo.email"); 737 "https://www.googleapis.com/auth/userinfo.email");
738 userinfo_token_info.audience = gaia_urls->oauth2_chrome_client_id(); 738 userinfo_token_info.audience = gaia_urls->oauth2_chrome_client_id();
739 userinfo_token_info.email = kTestEnterpriseServiceAccountId; 739 userinfo_token_info.email = kTestEnterpriseServiceAccountId;
740 fake_gaia_.IssueOAuthToken(kTestRefreshToken, userinfo_token_info); 740 fake_gaia_->IssueOAuthToken(kTestRefreshToken, userinfo_token_info);
741 741
742 // The any-api access token for accessing the token minting endpoint. 742 // The any-api access token for accessing the token minting endpoint.
743 FakeGaia::AccessTokenInfo login_token_info; 743 FakeGaia::AccessTokenInfo login_token_info;
744 login_token_info.token = kTestLoginToken; 744 login_token_info.token = kTestLoginToken;
745 login_token_info.scopes.insert(GaiaConstants::kAnyApiOAuth2Scope); 745 login_token_info.scopes.insert(GaiaConstants::kAnyApiOAuth2Scope);
746 login_token_info.audience = gaia_urls->oauth2_chrome_client_id(); 746 login_token_info.audience = gaia_urls->oauth2_chrome_client_id();
747 fake_gaia_.IssueOAuthToken(kTestRefreshToken, login_token_info); 747 fake_gaia_->IssueOAuthToken(kTestRefreshToken, login_token_info);
748 748
749 // This is the access token requested by the app via the identity API. 749 // This is the access token requested by the app via the identity API.
750 FakeGaia::AccessTokenInfo access_token_info; 750 FakeGaia::AccessTokenInfo access_token_info;
751 access_token_info.token = kTestAccessToken; 751 access_token_info.token = kTestAccessToken;
752 access_token_info.scopes.insert(kTestAppScope); 752 access_token_info.scopes.insert(kTestAppScope);
753 access_token_info.audience = kTestClientId; 753 access_token_info.audience = kTestClientId;
754 access_token_info.email = kTestEnterpriseServiceAccountId; 754 access_token_info.email = kTestEnterpriseServiceAccountId;
755 fake_gaia_.IssueOAuthToken(kTestLoginToken, access_token_info); 755 fake_gaia_->IssueOAuthToken(kTestLoginToken, access_token_info);
756 756
757 DeviceOAuth2TokenService* token_service = NULL; 757 DeviceOAuth2TokenService* token_service = NULL;
758 DeviceOAuth2TokenServiceFactory::Get( 758 DeviceOAuth2TokenServiceFactory::Get(
759 base::Bind(&CopyTokenService, &token_service)); 759 base::Bind(&CopyTokenService, &token_service));
760 base::RunLoop().RunUntilIdle(); 760 base::RunLoop().RunUntilIdle();
761 ASSERT_TRUE(token_service); 761 ASSERT_TRUE(token_service);
762 token_service->SetAndSaveRefreshToken(kTestRefreshToken); 762 token_service->SetAndSaveRefreshToken(kTestRefreshToken);
763 } 763 }
764 764
765 static void StorePolicyCallback(bool result) { 765 static void StorePolicyCallback(bool result) {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 content::WindowedNotificationObserver( 891 content::WindowedNotificationObserver(
892 chrome::NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_VISIBLE, 892 chrome::NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_VISIBLE,
893 content::NotificationService::AllSources()).Wait(); 893 content::NotificationService::AllSources()).Wait();
894 894
895 // Wait for the wallpaper to load. 895 // Wait for the wallpaper to load.
896 WaitForWallpaper(); 896 WaitForWallpaper();
897 EXPECT_TRUE(wallpaper_loaded()); 897 EXPECT_TRUE(wallpaper_loaded());
898 } 898 }
899 899
900 } // namespace chromeos 900 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/merge_session_load_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698