Index: chrome/browser/extensions/api/identity/identity_apitest.cc |
diff --git a/chrome/browser/extensions/api/identity/identity_apitest.cc b/chrome/browser/extensions/api/identity/identity_apitest.cc |
index e5d05bbadee53836f08c4de1644d4e1775aeb3e9..7f49ae4794cb5c546fac48ea99253f1590dd72fb 100644 |
--- a/chrome/browser/extensions/api/identity/identity_apitest.cc |
+++ b/chrome/browser/extensions/api/identity/identity_apitest.cc |
@@ -177,6 +177,7 @@ IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
EXPECT_EQ(std::string(errors::kInvalidClientId), error); |
EXPECT_FALSE(func->login_ui_shown()); |
EXPECT_FALSE(func->install_ui_shown()); |
+ CloseShellWindowsAndWaitForAppToExit(); |
} |
IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
@@ -188,6 +189,7 @@ IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
EXPECT_EQ(std::string(errors::kInvalidScopes), error); |
EXPECT_FALSE(func->login_ui_shown()); |
EXPECT_FALSE(func->install_ui_shown()); |
+ CloseShellWindowsAndWaitForAppToExit(); |
} |
IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
@@ -200,6 +202,7 @@ IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
EXPECT_EQ(std::string(errors::kUserNotSignedIn), error); |
EXPECT_FALSE(func->login_ui_shown()); |
EXPECT_FALSE(func->install_ui_shown()); |
+ CloseShellWindowsAndWaitForAppToExit(); |
} |
IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
@@ -217,6 +220,7 @@ IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
EXPECT_TRUE(StartsWithASCII(error, errors::kAuthFailure, false)); |
EXPECT_FALSE(func->login_ui_shown()); |
EXPECT_FALSE(func->install_ui_shown()); |
+ CloseShellWindowsAndWaitForAppToExit(); |
} |
IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
@@ -236,6 +240,7 @@ IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
EXPECT_EQ(std::string(kAccessToken), access_token); |
EXPECT_FALSE(func->login_ui_shown()); |
EXPECT_FALSE(func->install_ui_shown()); |
+ CloseShellWindowsAndWaitForAppToExit(); |
} |
IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
@@ -248,6 +253,7 @@ IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
EXPECT_EQ(std::string(errors::kUserNotSignedIn), error); |
EXPECT_TRUE(func->login_ui_shown()); |
EXPECT_FALSE(func->install_ui_shown()); |
+ CloseShellWindowsAndWaitForAppToExit(); |
} |
IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
@@ -265,6 +271,7 @@ IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
EXPECT_TRUE(StartsWithASCII(error, errors::kAuthFailure, false)); |
EXPECT_TRUE(func->login_ui_shown()); |
EXPECT_FALSE(func->install_ui_shown()); |
+ CloseShellWindowsAndWaitForAppToExit(); |
} |
IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
@@ -284,6 +291,7 @@ IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
EXPECT_EQ(std::string(kAccessToken), access_token); |
EXPECT_TRUE(func->login_ui_shown()); |
EXPECT_FALSE(func->install_ui_shown()); |
+ CloseShellWindowsAndWaitForAppToExit(); |
} |
IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
@@ -302,6 +310,7 @@ IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
EXPECT_EQ(std::string(errors::kUserRejected), error); |
EXPECT_TRUE(func->login_ui_shown()); |
EXPECT_TRUE(func->install_ui_shown()); |
+ CloseShellWindowsAndWaitForAppToExit(); |
} |
IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
@@ -326,6 +335,7 @@ IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
EXPECT_TRUE(StartsWithASCII(error, errors::kAuthFailure, false)); |
EXPECT_TRUE(func->login_ui_shown()); |
EXPECT_TRUE(func->install_ui_shown()); |
+ CloseShellWindowsAndWaitForAppToExit(); |
} |
IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
@@ -352,6 +362,7 @@ IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
EXPECT_EQ(std::string(kAccessToken), access_token); |
EXPECT_TRUE(func->login_ui_shown()); |
EXPECT_TRUE(func->install_ui_shown()); |
+ CloseShellWindowsAndWaitForAppToExit(); |
} |
IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
@@ -370,6 +381,7 @@ IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
EXPECT_EQ(std::string(errors::kUserRejected), error); |
EXPECT_FALSE(func->login_ui_shown()); |
EXPECT_TRUE(func->install_ui_shown()); |
+ CloseShellWindowsAndWaitForAppToExit(); |
} |
IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
@@ -396,6 +408,7 @@ IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionTest, |
EXPECT_EQ(std::string(kAccessToken), access_token); |
EXPECT_FALSE(func->login_ui_shown()); |
EXPECT_TRUE(func->install_ui_shown()); |
+ CloseShellWindowsAndWaitForAppToExit(); |
} |
class LaunchWebAuthFlowFunctionTest : public ExtensionBrowserTest { |