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

Side by Side Diff: chrome/browser/chromeos/login/saml/saml_browsertest.cc

Issue 1889213002: Revert of Add enterprise enrollment support for fake users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 4 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
OLDNEW
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 <cstring> 5 #include <cstring>
6 #include <memory> 6 #include <memory>
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 } 839 }
840 840
841 // Waits until the class |oauth-enroll-state-success| becomes set for the 841 // Waits until the class |oauth-enroll-state-success| becomes set for the
842 // enrollment screen, indicating enrollment success. 842 // enrollment screen, indicating enrollment success.
843 void SAMLEnrollmentTest::WaitForEnrollmentSuccess() { 843 void SAMLEnrollmentTest::WaitForEnrollmentSuccess() {
844 bool done = false; 844 bool done = false;
845 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( 845 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
846 GetLoginUI()->GetWebContents(), 846 GetLoginUI()->GetWebContents(),
847 "var enrollmentScreen = document.getElementById('oauth-enrollment');" 847 "var enrollmentScreen = document.getElementById('oauth-enrollment');"
848 "function SendReplyIfEnrollmentDone() {" 848 "function SendReplyIfEnrollmentDone() {"
849 " if (enrollmentScreen.classList.contains("
850 " 'oauth-enroll-state-attribute-prompt')) {"
851 " $('oauth-enroll-attribute-prompt-card').fire('submit');"
852 " return false;"
853 " }"
854 " if (!enrollmentScreen.classList.contains(" 849 " if (!enrollmentScreen.classList.contains("
855 " 'oauth-enroll-state-success')) {" 850 " 'oauth-enroll-state-success')) {"
856 " return false;" 851 " return false;"
857 " }" 852 " }"
858 " domAutomationController.send(true);" 853 " domAutomationController.send(true);"
859 " observer.disconnect();" 854 " observer.disconnect();"
860 " return true;" 855 " return true;"
861 "}" 856 "}"
862 "var observer = new MutationObserver(SendReplyIfEnrollmentDone);" 857 "var observer = new MutationObserver(SendReplyIfEnrollmentDone);"
863 "if (!SendReplyIfEnrollmentDone()) {" 858 "if (!SendReplyIfEnrollmentDone()) {"
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 chrome::NOTIFICATION_SESSION_STARTED, 1358 chrome::NOTIFICATION_SESSION_STARTED,
1364 content::NotificationService::AllSources()); 1359 content::NotificationService::AllSources());
1365 1360
1366 OobeScreenWaiter(OobeScreen::SCREEN_CONFIRM_PASSWORD).Wait(); 1361 OobeScreenWaiter(OobeScreen::SCREEN_CONFIRM_PASSWORD).Wait();
1367 SendConfirmPassword("fake_password"); 1362 SendConfirmPassword("fake_password");
1368 // Login should finish login and a session should start. 1363 // Login should finish login and a session should start.
1369 session_start_waiter.Wait(); 1364 session_start_waiter.Wait();
1370 } 1365 }
1371 1366
1372 } // namespace chromeos 1367 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698