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

Side by Side Diff: chrome/browser/chromeos/system/device_disabling_browsertest.cc

Issue 1012083002: Resolve new GAIA flow's infinite loop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 5 years, 9 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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 WebUILoginView* const webui_login_view = host->GetWebUILoginView(); 183 WebUILoginView* const webui_login_view = host->GetWebUILoginView();
184 ASSERT_TRUE(webui_login_view); 184 ASSERT_TRUE(webui_login_view);
185 content::WebContents* const web_contents = webui_login_view->GetWebContents(); 185 content::WebContents* const web_contents = webui_login_view->GetWebContents();
186 ASSERT_TRUE(web_contents); 186 ASSERT_TRUE(web_contents);
187 ASSERT_TRUE(content::ExecuteScript(web_contents, 187 ASSERT_TRUE(content::ExecuteScript(web_contents,
188 "Oobe.showAddUserForTesting();")); 188 "Oobe.showAddUserForTesting();"));
189 189
190 // The login profile is scrubbed before attempting to show the login screen. 190 // The login profile is scrubbed before attempting to show the login screen.
191 // Wait for the scrubbing to finish. 191 // Wait for the scrubbing to finish.
192 base::RunLoop run_loop; 192 base::RunLoop run_loop;
193 ProfileHelper::Get()->ClearSigninProfile(run_loop.QuitClosure()); 193 ProfileHelper::Get()->ClearSigninProfile(run_loop.QuitClosure(), nullptr);
194 run_loop.Run(); 194 run_loop.Run();
195 base::RunLoop().RunUntilIdle(); 195 base::RunLoop().RunUntilIdle();
196 196
197 // Verify that the login screen was not shown and the device disabled screen 197 // Verify that the login screen was not shown and the device disabled screen
198 // is still being shown instead. 198 // is still being shown instead.
199 EXPECT_EQ(OobeUI::kScreenDeviceDisabled, GetCurrentScreenName(web_contents)); 199 EXPECT_EQ(OobeUI::kScreenDeviceDisabled, GetCurrentScreenName(web_contents));
200 200
201 // Disconnect from the fake Ethernet network. 201 // Disconnect from the fake Ethernet network.
202 OobeUI* const oobe_ui = host->GetOobeUI(); 202 OobeUI* const oobe_ui = host->GetOobeUI();
203 ASSERT_TRUE(oobe_ui); 203 ASSERT_TRUE(oobe_ui);
(...skipping 10 matching lines...) Expand all
214 network_state_informer->RemoveObserver(this); 214 network_state_informer->RemoveObserver(this);
215 base::RunLoop().RunUntilIdle(); 215 base::RunLoop().RunUntilIdle();
216 216
217 // Verify that the offline error screen was not shown and the device disabled 217 // Verify that the offline error screen was not shown and the device disabled
218 // screen is still being shown instead. 218 // screen is still being shown instead.
219 EXPECT_EQ(OobeUI::kScreenDeviceDisabled, GetCurrentScreenName(web_contents)); 219 EXPECT_EQ(OobeUI::kScreenDeviceDisabled, GetCurrentScreenName(web_contents));
220 } 220 }
221 221
222 } // namespace system 222 } // namespace system
223 } // namespace chromeos 223 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/profiles/profile_helper.cc ('k') | chrome/browser/resources/gaia_auth_host/authenticator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698