OLD | NEW |
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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 &FakeSamlIdp::HandleRequest, base::Unretained(&fake_saml_idp_))); | 264 &FakeSamlIdp::HandleRequest, base::Unretained(&fake_saml_idp_))); |
265 | 265 |
266 // Restart the thread as the sandbox host process has already been spawned. | 266 // Restart the thread as the sandbox host process has already been spawned. |
267 embedded_test_server()->RestartThreadAndListen(); | 267 embedded_test_server()->RestartThreadAndListen(); |
268 | 268 |
269 login_screen_load_observer_.reset(new content::WindowedNotificationObserver( | 269 login_screen_load_observer_.reset(new content::WindowedNotificationObserver( |
270 chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, | 270 chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, |
271 content::NotificationService::AllSources())); | 271 content::NotificationService::AllSources())); |
272 } | 272 } |
273 | 273 |
274 virtual void CleanUpOnMainThread() OVERRIDE { | 274 virtual void TearDownOnMainThread() OVERRIDE { |
275 // If the login display is still showing, exit gracefully. | 275 // If the login display is still showing, exit gracefully. |
276 if (LoginDisplayHostImpl::default_host()) { | 276 if (LoginDisplayHostImpl::default_host()) { |
277 base::MessageLoop::current()->PostTask(FROM_HERE, | 277 base::MessageLoop::current()->PostTask(FROM_HERE, |
278 base::Bind(&chrome::AttemptExit)); | 278 base::Bind(&chrome::AttemptExit)); |
279 content::RunMessageLoop(); | 279 content::RunMessageLoop(); |
280 } | 280 } |
281 } | 281 } |
282 | 282 |
283 void SetMergeSessionParams(const std::string& email) { | 283 void SetMergeSessionParams(const std::string& email) { |
284 FakeGaia::MergeSessionParams params; | 284 FakeGaia::MergeSessionParams params; |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 | 733 |
734 // Verifies that when the offline login time limit is exceeded for a user who | 734 // Verifies that when the offline login time limit is exceeded for a user who |
735 // authenticated via SAML, that user is forced to log in online the next time. | 735 // authenticated via SAML, that user is forced to log in online the next time. |
736 IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, SAMLZeroLimit) { | 736 IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, SAMLZeroLimit) { |
737 login_screen_load_observer_->Wait(); | 737 login_screen_load_observer_->Wait(); |
738 // Verify that offline login is not allowed. | 738 // Verify that offline login is not allowed. |
739 JsExpect("!document.querySelector('#pod-row .signin-button').hidden"); | 739 JsExpect("!document.querySelector('#pod-row .signin-button').hidden"); |
740 } | 740 } |
741 | 741 |
742 } // namespace chromeos | 742 } // namespace chromeos |
OLD | NEW |