Commit dea0b13b authored by Matt Menke's avatar Matt Menke Committed by Commit Bot

OSX: Try to fix NetworkContextConfigurationBrowserTest.CookiesEnabled.

Looks the CookieStore isn't flushed on browser exit, by default.

BUG=847555

Change-Id: I2596f8ea3d62a5d5e71e0514ba8e7caa6049605d
Reviewed-on: https://chromium-review.googlesource.com/1178803
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: default avatarMaks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583846}
parent 8e0ae023
...@@ -1211,18 +1211,17 @@ IN_PROC_BROWSER_TEST_P(NetworkContextConfigurationBrowserTest, ...@@ -1211,18 +1211,17 @@ IN_PROC_BROWSER_TEST_P(NetworkContextConfigurationBrowserTest,
SetCookie(CookieType::kFirstParty, CookiePersistenceType::kPersistent); SetCookie(CookieType::kFirstParty, CookiePersistenceType::kPersistent);
EXPECT_FALSE(GetCookies(embedded_test_server()->base_url()).empty()); EXPECT_FALSE(GetCookies(embedded_test_server()->base_url()).empty());
}
#if defined(OS_MACOSX) // Flush CookieStore. The CookieStore batches disk operations, so may not have
// Disable the test on Mac OSX since it fails on the bot. // written the cookie to disk yet.
// (https://crbug.com/847555) base::RunLoop run_loop;
#define MAYBE_CookiesEnabled DISABLED_CookiesEnabled network::mojom::CookieManagerPtr cookie_manager;
#else network_context()->GetCookieManager(mojo::MakeRequest(&cookie_manager));
#define MAYBE_CookiesEnabled CookiesEnabled cookie_manager->FlushCookieStore(run_loop.QuitClosure());
#endif run_loop.Run();
}
IN_PROC_BROWSER_TEST_P(NetworkContextConfigurationBrowserTest, IN_PROC_BROWSER_TEST_P(NetworkContextConfigurationBrowserTest, CookiesEnabled) {
MAYBE_CookiesEnabled) {
// Check that the cookie from the first stage of the test was / was not // Check that the cookie from the first stage of the test was / was not
// preserved between browser restarts, as expected. // preserved between browser restarts, as expected.
bool has_cookies = !GetCookies(embedded_test_server()->base_url()).empty(); bool has_cookies = !GetCookies(embedded_test_server()->base_url()).empty();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment