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

Side by Side Diff: chrome/browser/chromeos/login/test/oobe_base_test.cc

Issue 1384383002: Revert of browser test for kAccountsPrefAllowNewUser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 "chrome/browser/chromeos/login/test/oobe_base_test.h" 5 #include "chrome/browser/chromeos/login/test/oobe_base_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 WebUILoginDisplay* OobeBaseTest::GetLoginDisplay() { 208 WebUILoginDisplay* OobeBaseTest::GetLoginDisplay() {
209 ExistingUserController* controller = 209 ExistingUserController* controller =
210 ExistingUserController::current_controller(); 210 ExistingUserController::current_controller();
211 CHECK(controller); 211 CHECK(controller);
212 return static_cast<WebUILoginDisplay*>( 212 return static_cast<WebUILoginDisplay*>(
213 controller->login_display()); 213 controller->login_display());
214 } 214 }
215 215
216 void OobeBaseTest::WaitForGaiaPageLoad() { 216 void OobeBaseTest::WaitForGaiaPageLoad() {
217 WaitForSigninScreen(); 217 WaitForSigninScreen();
218 WaitForGaiaPageReload();
219 }
220 218
221 void OobeBaseTest::WaitForGaiaPageReload() {
222 JS().Evaluate( 219 JS().Evaluate(
223 "$('gaia-signin').gaiaAuthHost_.addEventListener('ready'," 220 "$('gaia-signin').gaiaAuthHost_.addEventListener('ready',"
224 "function() {" 221 "function() {"
225 "window.domAutomationController.setAutomationId(0);" 222 "window.domAutomationController.setAutomationId(0);"
226 "window.domAutomationController.send('GaiaReady');" 223 "window.domAutomationController.send('GaiaReady');"
227 "});"); 224 "});");
228 225
229 content::DOMMessageQueue message_queue; 226 content::DOMMessageQueue message_queue;
230 std::string message; 227 std::string message;
231 do { 228 do {
(...skipping 24 matching lines...) Expand all
256 "document.getElementById('$FieldId').value = '$FieldValue';" 253 "document.getElementById('$FieldId').value = '$FieldValue';"
257 "var e = new Event('input');" 254 "var e = new Event('input');"
258 "document.getElementById('$FieldId').dispatchEvent(e);" 255 "document.getElementById('$FieldId').dispatchEvent(e);"
259 "})();"; 256 "})();";
260 base::ReplaceSubstringsAfterOffset(&js, 0, "$FieldId", field_id); 257 base::ReplaceSubstringsAfterOffset(&js, 0, "$FieldId", field_id);
261 base::ReplaceSubstringsAfterOffset(&js, 0, "$FieldValue", field_value); 258 base::ReplaceSubstringsAfterOffset(&js, 0, "$FieldValue", field_value);
262 ExecuteJsInSigninFrame(js); 259 ExecuteJsInSigninFrame(js);
263 } 260 }
264 261
265 } // namespace chromeos 262 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/test/oobe_base_test.h ('k') | chrome/browser/chromeos/login/webview_login_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698