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

Unified Diff: chrome/browser/chromeos/login/test/oobe_base_test.cc

Issue 2668043002: Reland cros: Test for overlapping ContinueSessionRestore calls (Closed)
Patch Set: for comments in #4 Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/signin/oauth2_browsertest.cc ('k') | google_apis/gaia/fake_gaia.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/test/oobe_base_test.cc
diff --git a/chrome/browser/chromeos/login/test/oobe_base_test.cc b/chrome/browser/chromeos/login/test/oobe_base_test.cc
index 631c942b9acb1b9bced8b64007bf3af72894c300..7212020bc839aaf37eb6866e7885358052e3ca4d 100644
--- a/chrome/browser/chromeos/login/test/oobe_base_test.cc
+++ b/chrome/browser/chromeos/login/test/oobe_base_test.cc
@@ -228,16 +228,21 @@ void OobeBaseTest::WaitForGaiaPageLoad() {
}
void OobeBaseTest::WaitForGaiaPageReload() {
- JS()
- .Evaluate(
- "$('gaia-signin').gaiaAuthHost_.addEventListener('ready',"
- "function f() {"
- "$(\'gaia-signin\').gaiaAuthHost_.removeEventListener(\'ready\', f);"
- "window.domAutomationController.setAutomationId(0);"
- "window.domAutomationController.send('GaiaReady');"
- "});");
-
+ // Starts listening to message before executing the JS code that generates
+ // the message below.
content::DOMMessageQueue message_queue;
+
+ JS().Evaluate(
+ "(function() {"
+ " var authenticator = $('gaia-signin').gaiaAuthHost_;"
+ " var f = function() {"
+ " authenticator.removeEventListener('ready', f);"
+ " window.domAutomationController.setAutomationId(0);"
+ " window.domAutomationController.send('GaiaReady');"
+ " };"
+ " authenticator.addEventListener('ready', f);"
+ "})();");
+
std::string message;
do {
ASSERT_TRUE(message_queue.WaitForMessage(&message));
« no previous file with comments | « chrome/browser/chromeos/login/signin/oauth2_browsertest.cc ('k') | google_apis/gaia/fake_gaia.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698