Index: chrome/browser/app_controller_mac_browsertest.mm |
diff --git a/chrome/browser/app_controller_mac_browsertest.mm b/chrome/browser/app_controller_mac_browsertest.mm |
index 288b24e4b7c7df1868c8b21eab57013206588a7c..f23b840ddbe0dd986bc05176aa0306b15ce79e0e 100644 |
--- a/chrome/browser/app_controller_mac_browsertest.mm |
+++ b/chrome/browser/app_controller_mac_browsertest.mm |
@@ -664,10 +664,9 @@ IN_PROC_BROWSER_TEST_F(AppControllerHandoffBrowserTest, TestHandoffURLs) { |
BrowserList::GetInstance(chrome::GetActiveDesktop()); |
EXPECT_EQ(2u, active_browser_list->size()); |
- // Close the one and only tab for the second browser window. |
+ // Close the second browser window (which only has 1 tab left). |
Browser* browser2 = active_browser_list->get(1); |
- CloseTab(browser2, 0); |
- base::RunLoop().RunUntilIdle(); |
+ CloseBrowserSynchronously(browser2); |
EXPECT_EQ(g_handoff_url, test_url2); |
// The URLs of incognito windows should not be passed to Handoff. |