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,
SetCookie(CookieType::kFirstParty, CookiePersistenceType::kPersistent);
EXPECT_FALSE(GetCookies(embedded_test_server()->base_url()).empty());
}
#if defined(OS_MACOSX)
// Disable the test on Mac OSX since it fails on the bot.
// (https://crbug.com/847555)
#define MAYBE_CookiesEnabled DISABLED_CookiesEnabled
#else
#define MAYBE_CookiesEnabled CookiesEnabled
#endif
// Flush CookieStore. The CookieStore batches disk operations, so may not have
// written the cookie to disk yet.
base::RunLoop run_loop;
network::mojom::CookieManagerPtr cookie_manager;
network_context()->GetCookieManager(mojo::MakeRequest(&cookie_manager));
cookie_manager->FlushCookieStore(run_loop.QuitClosure());
run_loop.Run();
}
IN_PROC_BROWSER_TEST_P(NetworkContextConfigurationBrowserTest,
MAYBE_CookiesEnabled) {
IN_PROC_BROWSER_TEST_P(NetworkContextConfigurationBrowserTest, CookiesEnabled) {
// Check that the cookie from the first stage of the test was / was not
// preserved between browser restarts, as expected.
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