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

Unified Diff: chrome/browser/chromeos/arc/auth/arc_robot_auth_code_fetcher_browsertest.cc

Issue 2547073002: Fix race issue in ArcAuthService. (Closed)
Patch Set: Address comments Created 4 years 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/arc/auth/arc_robot_auth_code_fetcher.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/auth/arc_robot_auth_code_fetcher_browsertest.cc
diff --git a/chrome/browser/chromeos/arc/auth/arc_robot_auth_browsertest.cc b/chrome/browser/chromeos/arc/auth/arc_robot_auth_code_fetcher_browsertest.cc
similarity index 92%
rename from chrome/browser/chromeos/arc/auth/arc_robot_auth_browsertest.cc
rename to chrome/browser/chromeos/arc/auth/arc_robot_auth_code_fetcher_browsertest.cc
index ba6ab84d568a8984e80b880988eb31759237ba47..1ec0c7c61a144630005e2e78d8a70ac262335b1f 100644
--- a/chrome/browser/chromeos/arc/auth/arc_robot_auth_browsertest.cc
+++ b/chrome/browser/chromeos/arc/auth/arc_robot_auth_code_fetcher_browsertest.cc
@@ -78,12 +78,12 @@ class FakeAuthInstance : public arc::mojom::AuthInstance {
} // namespace
-class ArcRobotAuthBrowserTest : public InProcessBrowserTest {
+class ArcRobotAuthCodeFetcherBrowserTest : public InProcessBrowserTest {
protected:
- ArcRobotAuthBrowserTest() = default;
+ ArcRobotAuthCodeFetcherBrowserTest() = default;
// InProcessBrowserTest:
- ~ArcRobotAuthBrowserTest() override = default;
+ ~ArcRobotAuthCodeFetcherBrowserTest() override = default;
void SetUpCommandLine(base::CommandLine* command_line) override {
InProcessBrowserTest::SetUpCommandLine(command_line);
@@ -144,10 +144,11 @@ class ArcRobotAuthBrowserTest : public InProcessBrowserTest {
private:
std::unique_ptr<chromeos::ScopedUserManagerEnabler> user_manager_enabler_;
- DISALLOW_COPY_AND_ASSIGN(ArcRobotAuthBrowserTest);
+ DISALLOW_COPY_AND_ASSIGN(ArcRobotAuthCodeFetcherBrowserTest);
};
-IN_PROC_BROWSER_TEST_F(ArcRobotAuthBrowserTest, RequestAccountInfoSuccess) {
+IN_PROC_BROWSER_TEST_F(ArcRobotAuthCodeFetcherBrowserTest,
+ RequestAccountInfoSuccess) {
interceptor_->PushJobCallback(base::Bind(&ResponseJob));
auth_instance_.callback =
@@ -162,13 +163,15 @@ IN_PROC_BROWSER_TEST_F(ArcRobotAuthBrowserTest, RequestAccountInfoSuccess) {
base::RunLoop().RunUntilIdle();
}
-IN_PROC_BROWSER_TEST_F(ArcRobotAuthBrowserTest, RequestAccountInfoError) {
+IN_PROC_BROWSER_TEST_F(ArcRobotAuthCodeFetcherBrowserTest,
+ RequestAccountInfoError) {
interceptor_->PushJobCallback(
policy::TestRequestInterceptor::BadRequestJob());
auth_instance_.callback =
base::Bind([](const mojom::AccountInfoPtr&) { FAIL(); });
+ ArcSessionManager::Get()->StartArc();
ArcAuthService::GetForTest()->RequestAccountInfo();
// This MessageLoop will be stopped by AttemptUserExit(), that is called as
// a result of error of auth code fetching.
« no previous file with comments | « chrome/browser/chromeos/arc/auth/arc_robot_auth_code_fetcher.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698