Commit 237be457 authored by Matt Menke's avatar Matt Menke Committed by Commit Bot

Migrate LoadTimingBrowserTest.Proxy to EmbeddedTestServer.

It's one of two tests across all of Chrome using
BrowserTestBase::spawned_test_server(), which we should remove.

Also re-enable the test on Windows. It was disabled due to
https://crbug.com/1140928, the underlying cause of which has now been
fixed.

Fixed: 997823
Bug: 492672
Change-Id: I2eb43613aac3b05299fbb15d37967a3de30a2380
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2499081Reviewed-by: default avatarSteven Valdez <svaldez@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820780}
parent 6e5458b0
......@@ -28,6 +28,7 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/spawned_test_server/spawned_test_server.h"
#include "third_party/blink/public/common/features.h"
#include "url/gurl.h"
......@@ -151,19 +152,13 @@ IN_PROC_BROWSER_TEST_F(LoadTimingBrowserTest, DISABLED_HTTPS) {
navigation_deltas.receive_headers_end);
}
// Flaky on Win10: crbug.com/997823
#if defined(OS_WIN)
#define MAYBE_Proxy DISABLED_Proxy
#else
#define MAYBE_Proxy Proxy
#endif
IN_PROC_BROWSER_TEST_F(LoadTimingBrowserTest, MAYBE_Proxy) {
ASSERT_TRUE(spawned_test_server()->Start());
IN_PROC_BROWSER_TEST_F(LoadTimingBrowserTest, Proxy) {
ASSERT_TRUE(embedded_test_server()->Start());
browser()->profile()->GetPrefs()->Set(
proxy_config::prefs::kProxy,
ProxyConfigDictionary::CreateFixedServers(
spawned_test_server()->host_port_pair().ToString(), std::string()));
embedded_test_server()->host_port_pair().ToString(), std::string()));
ProfileNetworkContextServiceFactory::GetForContext(browser()->profile())
->FlushProxyConfigMonitorForTesting();
......
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