[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Sebastien Marchand | f1349f5 | 2019-01-25 03:16:41 | [diff] [blame] | 5 | #include "base/bind.h" |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 6 | #include "base/command_line.h" |
svaldez | e274587 | 2015-11-04 23:30:20 | [diff] [blame] | 7 | #include "base/files/file_path.h" |
mmenke | 0a8ca0d1 | 2017-05-03 18:40:07 | [diff] [blame] | 8 | #include "base/location.h" |
avi | 6846aef | 2015-12-26 01:09:38 | [diff] [blame] | 9 | #include "base/macros.h" |
Eric Roman | 7193c9f | 2018-11-22 01:39:58 | [diff] [blame] | 10 | #include "base/run_loop.h" |
[email protected] | f9b29436 | 2013-06-10 20:22:31 | [diff] [blame] | 11 | #include "base/strings/string_util.h" |
[email protected] | 112158af | 2013-06-07 23:46:18 | [diff] [blame] | 12 | #include "base/strings/utf_string_conversions.h" |
Jay Civelli | 1ba11572 | 2018-07-16 17:41:01 | [diff] [blame] | 13 | #include "base/test/bind_test_util.h" |
avi | 6846aef | 2015-12-26 01:09:38 | [diff] [blame] | 14 | #include "build/build_config.h" |
[email protected] | 9ea0cd3 | 2013-07-12 01:50:36 | [diff] [blame] | 15 | #include "chrome/browser/chrome_notification_types.h" |
Emily Stark | a4cfb872 | 2019-07-03 01:14:40 | [diff] [blame] | 16 | #include "chrome/browser/net/proxy_test_utils.h" |
mmenke | 0a8ca0d1 | 2017-05-03 18:40:07 | [diff] [blame] | 17 | #include "chrome/browser/profiles/profile.h" |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 18 | #include "chrome/browser/ui/browser.h" |
tfarina | 535e6f5 | 2016-03-31 13:46:49 | [diff] [blame] | 19 | #include "chrome/browser/ui/login/login_handler.h" |
[email protected] | 47ae2337 | 2013-01-29 01:50:48 | [diff] [blame] | 20 | #include "chrome/browser/ui/tabs/tab_strip_model.h" |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 21 | #include "chrome/common/chrome_paths.h" |
| 22 | #include "chrome/common/chrome_switches.h" |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 23 | #include "chrome/test/base/in_process_browser_test.h" |
| 24 | #include "chrome/test/base/ui_test_utils.h" |
mmenke | 0a8ca0d1 | 2017-05-03 18:40:07 | [diff] [blame] | 25 | #include "content/public/browser/browser_thread.h" |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 26 | #include "content/public/browser/notification_details.h" |
| 27 | #include "content/public/browser/notification_source.h" |
Sergio Villar Senin | c4f55f7 | 2018-07-19 07:49:15 | [diff] [blame] | 28 | #include "content/public/browser/storage_partition.h" |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 29 | #include "content/public/browser/web_contents.h" |
| 30 | #include "content/public/browser/web_contents_observer.h" |
yzshen | a90291c | 2017-04-26 16:22:52 | [diff] [blame] | 31 | #include "content/public/common/content_switches.h" |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 32 | #include "content/public/test/browser_test_utils.h" |
Jay Civelli | 1ba11572 | 2018-07-16 17:41:01 | [diff] [blame] | 33 | #include "content/public/test/url_loader_interceptor.h" |
| 34 | #include "google_apis/gaia/gaia_urls.h" |
mmenke | 0a8ca0d1 | 2017-05-03 18:40:07 | [diff] [blame] | 35 | #include "net/base/load_flags.h" |
svaldez | e274587 | 2015-11-04 23:30:20 | [diff] [blame] | 36 | #include "net/test/embedded_test_server/embedded_test_server.h" |
mmenke | ab0c11d | 2017-05-30 17:15:17 | [diff] [blame] | 37 | #include "net/test/embedded_test_server/simple_connection_listener.h" |
[email protected] | 89b3252 | 2013-05-07 20:04:21 | [diff] [blame] | 38 | #include "net/test/spawned_test_server/spawned_test_server.h" |
rsleevi | a69c79a | 2016-06-22 03:28:43 | [diff] [blame] | 39 | #include "net/test/test_data_directory.h" |
rhalavati | 8aa3fbb7 | 2017-05-22 23:27:18 | [diff] [blame] | 40 | #include "net/traffic_annotation/network_traffic_annotation_test_helper.h" |
Sergio Villar Senin | c4f55f7 | 2018-07-19 07:49:15 | [diff] [blame] | 41 | #include "services/network/public/cpp/simple_url_loader.h" |
mmenke | 0a8ca0d1 | 2017-05-03 18:40:07 | [diff] [blame] | 42 | #include "url/gurl.h" |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 43 | |
Andreea Costinas | 3ee19b6 | 2019-09-23 08:29:26 | [diff] [blame] | 44 | #if defined(OS_CHROMEOS) |
| 45 | #include "chrome/browser/chromeos/net/dhcp_wpad_url_client.h" |
| 46 | #endif // defined(OS_CHROMEOS) |
| 47 | |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 48 | namespace { |
| 49 | |
[email protected] | b3ae2db | 2013-05-30 05:00:05 | [diff] [blame] | 50 | // Verify kPACScript is installed as the PAC script. |
| 51 | void VerifyProxyScript(Browser* browser) { |
| 52 | ui_test_utils::NavigateToURL(browser, GURL("http://google.com")); |
| 53 | |
| 54 | // Verify we get the ERR_PROXY_CONNECTION_FAILED screen. |
| 55 | bool result = false; |
| 56 | EXPECT_TRUE(content::ExecuteScriptAndExtractBool( |
| 57 | browser->tab_strip_model()->GetActiveWebContents(), |
| 58 | "var textContent = document.body.textContent;" |
| 59 | "var hasError = textContent.indexOf('ERR_PROXY_CONNECTION_FAILED') >= 0;" |
| 60 | "domAutomationController.send(hasError);", |
| 61 | &result)); |
| 62 | EXPECT_TRUE(result); |
| 63 | } |
| 64 | |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 65 | // This class observes chrome::NOTIFICATION_AUTH_NEEDED and supplies |
| 66 | // the credential which is required by the test proxy server. |
| 67 | // "foo:bar" is the required username and password for our test proxy server. |
| 68 | class LoginPromptObserver : public content::NotificationObserver { |
| 69 | public: |
| 70 | LoginPromptObserver() : auth_handled_(false) {} |
| 71 | |
dcheng | fce29ad | 2014-10-23 03:47:47 | [diff] [blame] | 72 | void Observe(int type, |
| 73 | const content::NotificationSource& source, |
| 74 | const content::NotificationDetails& details) override { |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 75 | if (type == chrome::NOTIFICATION_AUTH_NEEDED) { |
| 76 | LoginNotificationDetails* login_details = |
| 77 | content::Details<LoginNotificationDetails>(details).ptr(); |
| 78 | // |login_details->handler()| is the associated LoginHandler object. |
| 79 | // SetAuth() will close the login dialog. |
[email protected] | 6778fed | 2013-12-24 20:09:37 | [diff] [blame] | 80 | login_details->handler()->SetAuth(base::ASCIIToUTF16("foo"), |
| 81 | base::ASCIIToUTF16("bar")); |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 82 | auth_handled_ = true; |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | bool auth_handled() const { return auth_handled_; } |
| 87 | |
| 88 | private: |
| 89 | bool auth_handled_; |
[email protected] | 5b7115b3 | 2012-12-05 21:38:09 | [diff] [blame] | 90 | |
| 91 | DISALLOW_COPY_AND_ASSIGN(LoginPromptObserver); |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 92 | }; |
| 93 | |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 94 | // Test that the browser can establish a WebSocket connection via a proxy |
Adam Rice | 425cf12 | 2015-01-19 06:18:24 | [diff] [blame] | 95 | // that requires basic authentication. This test also checks the headers |
| 96 | // arrive at WebSocket server. |
Eric Roman | efdf315b | 2018-11-12 16:57:08 | [diff] [blame] | 97 | IN_PROC_BROWSER_TEST_F(ProxyBrowserTest, BasicAuthWSConnect) { |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 98 | // Launch WebSocket server. |
[email protected] | ce7d0cbc | 2013-05-03 18:57:22 | [diff] [blame] | 99 | net::SpawnedTestServer ws_server(net::SpawnedTestServer::TYPE_WS, |
[email protected] | ce7d0cbc | 2013-05-03 18:57:22 | [diff] [blame] | 100 | net::GetWebSocketTestDataDirectory()); |
[email protected] | e0e6f9f | 2012-10-24 05:35:44 | [diff] [blame] | 101 | ASSERT_TRUE(ws_server.Start()); |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 102 | |
[email protected] | 47ae2337 | 2013-01-29 01:50:48 | [diff] [blame] | 103 | content::WebContents* tab = |
| 104 | browser()->tab_strip_model()->GetActiveWebContents(); |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 105 | content::NavigationController* controller = &tab->GetController(); |
| 106 | content::NotificationRegistrar registrar; |
| 107 | // The proxy server will request basic authentication. |
| 108 | // |observer| supplies the credential. |
| 109 | LoginPromptObserver observer; |
| 110 | registrar.Add(&observer, chrome::NOTIFICATION_AUTH_NEEDED, |
| 111 | content::Source<content::NavigationController>(controller)); |
| 112 | |
[email protected] | 6778fed | 2013-12-24 20:09:37 | [diff] [blame] | 113 | content::TitleWatcher watcher(tab, base::ASCIIToUTF16("PASS")); |
| 114 | watcher.AlsoWaitForTitle(base::ASCIIToUTF16("FAIL")); |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 115 | |
| 116 | // Visit a page that tries to establish WebSocket connection. The title |
| 117 | // of the page will be 'PASS' on success. |
[email protected] | e0e6f9f | 2012-10-24 05:35:44 | [diff] [blame] | 118 | GURL::Replacements replacements; |
mgiuca | 77752c3 | 2015-02-05 07:31:18 | [diff] [blame] | 119 | replacements.SetSchemeStr("http"); |
Adam Rice | 425cf12 | 2015-01-19 06:18:24 | [diff] [blame] | 120 | ui_test_utils::NavigateToURL(browser(), |
| 121 | ws_server.GetURL("proxied_request_check.html") |
| 122 | .ReplaceComponents(replacements)); |
[email protected] | f20dead | 2013-03-02 03:01:48 | [diff] [blame] | 123 | |
[email protected] | 439f1e3 | 2013-12-09 20:09:09 | [diff] [blame] | 124 | const base::string16 result = watcher.WaitAndGetTitle(); |
brettw | 00a56b7 | 2015-06-10 03:47:26 | [diff] [blame] | 125 | EXPECT_TRUE(base::EqualsASCII(result, "PASS")); |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 126 | EXPECT_TRUE(observer.auth_handled()); |
| 127 | } |
| 128 | |
Eric Roman | 7193c9f | 2018-11-22 01:39:58 | [diff] [blame] | 129 | // Fetches a PAC script via an http:// URL, and ensures that requests to |
| 130 | // http://www.google.com fail with ERR_PROXY_CONNECTION_FAILED (by virtue of |
| 131 | // PAC file having selected a non-existent PROXY server). |
| 132 | class BaseHttpProxyScriptBrowserTest : public InProcessBrowserTest { |
[email protected] | b3ae2db | 2013-05-30 05:00:05 | [diff] [blame] | 133 | public: |
Eric Roman | 7193c9f | 2018-11-22 01:39:58 | [diff] [blame] | 134 | BaseHttpProxyScriptBrowserTest() { |
Alan Cutter | a9a96c5 | 2019-03-28 07:15:39 | [diff] [blame] | 135 | http_server_.ServeFilesFromSourceDirectory(GetChromeTestDataDir()); |
[email protected] | b3ae2db | 2013-05-30 05:00:05 | [diff] [blame] | 136 | } |
Eric Roman | 7193c9f | 2018-11-22 01:39:58 | [diff] [blame] | 137 | ~BaseHttpProxyScriptBrowserTest() override {} |
[email protected] | b3ae2db | 2013-05-30 05:00:05 | [diff] [blame] | 138 | |
dcheng | e1bc798 | 2014-10-30 00:32:40 | [diff] [blame] | 139 | void SetUp() override { |
[email protected] | b3ae2db | 2013-05-30 05:00:05 | [diff] [blame] | 140 | ASSERT_TRUE(http_server_.Start()); |
| 141 | InProcessBrowserTest::SetUp(); |
| 142 | } |
| 143 | |
avi | 556c0502 | 2014-12-22 23:31:43 | [diff] [blame] | 144 | void SetUpCommandLine(base::CommandLine* command_line) override { |
Eric Roman | 7193c9f | 2018-11-22 01:39:58 | [diff] [blame] | 145 | command_line->AppendSwitchASCII( |
| 146 | switches::kProxyPacUrl, |
| 147 | http_server_.GetURL("/" + GetPacFilename()).spec()); |
[email protected] | b3ae2db | 2013-05-30 05:00:05 | [diff] [blame] | 148 | } |
| 149 | |
Eric Roman | 7193c9f | 2018-11-22 01:39:58 | [diff] [blame] | 150 | protected: |
| 151 | virtual std::string GetPacFilename() = 0; |
Andreea Costinas | 3ee19b6 | 2019-09-23 08:29:26 | [diff] [blame] | 152 | net::EmbeddedTestServer http_server_; |
Eric Roman | 7193c9f | 2018-11-22 01:39:58 | [diff] [blame] | 153 | |
[email protected] | b3ae2db | 2013-05-30 05:00:05 | [diff] [blame] | 154 | private: |
Eric Roman | 7193c9f | 2018-11-22 01:39:58 | [diff] [blame] | 155 | DISALLOW_COPY_AND_ASSIGN(BaseHttpProxyScriptBrowserTest); |
| 156 | }; |
[email protected] | b3ae2db | 2013-05-30 05:00:05 | [diff] [blame] | 157 | |
Eric Roman | 7193c9f | 2018-11-22 01:39:58 | [diff] [blame] | 158 | // Tests the use of a PAC script that rejects requests to http://www.google.com/ |
| 159 | class HttpProxyScriptBrowserTest : public BaseHttpProxyScriptBrowserTest { |
| 160 | public: |
| 161 | HttpProxyScriptBrowserTest() = default; |
| 162 | ~HttpProxyScriptBrowserTest() override {} |
| 163 | |
| 164 | std::string GetPacFilename() override { |
| 165 | // PAC script that sends all requests to an invalid proxy server. |
| 166 | return "bad_server.pac"; |
| 167 | } |
| 168 | |
| 169 | private: |
[email protected] | b3ae2db | 2013-05-30 05:00:05 | [diff] [blame] | 170 | DISALLOW_COPY_AND_ASSIGN(HttpProxyScriptBrowserTest); |
| 171 | }; |
| 172 | |
| 173 | IN_PROC_BROWSER_TEST_F(HttpProxyScriptBrowserTest, Verify) { |
| 174 | VerifyProxyScript(browser()); |
| 175 | } |
| 176 | |
Andreea Costinas | 3ee19b6 | 2019-09-23 08:29:26 | [diff] [blame] | 177 | #if defined(OS_CHROMEOS) |
| 178 | // Tests the use of a PAC script set via Web Proxy Autodiscovery Protocol. |
| 179 | // TODO(crbug.com/991867): Add a test case for when DhcpWpadUrlClient |
| 180 | // returns an empty PAC URL. |
| 181 | class WPADHttpProxyScriptBrowserTest : public HttpProxyScriptBrowserTest { |
| 182 | public: |
| 183 | WPADHttpProxyScriptBrowserTest() = default; |
| 184 | ~WPADHttpProxyScriptBrowserTest() override {} |
| 185 | |
| 186 | void SetUp() override { |
| 187 | ASSERT_TRUE(http_server_.Start()); |
| 188 | pac_url_ = http_server_.GetURL("/" + GetPacFilename()); |
| 189 | chromeos::DhcpWpadUrlClient::SetPacUrlForTesting(pac_url_); |
| 190 | InProcessBrowserTest::SetUp(); |
| 191 | } |
| 192 | |
| 193 | void TearDown() override { |
| 194 | chromeos::DhcpWpadUrlClient::ClearPacUrlForTesting(); |
| 195 | InProcessBrowserTest::TearDown(); |
| 196 | } |
| 197 | |
| 198 | void SetUpCommandLine(base::CommandLine* command_line) override { |
| 199 | command_line->AppendSwitch(switches::kProxyAutoDetect); |
| 200 | } |
| 201 | |
| 202 | private: |
| 203 | GURL pac_url_; |
| 204 | DISALLOW_COPY_AND_ASSIGN(WPADHttpProxyScriptBrowserTest); |
| 205 | }; |
| 206 | |
| 207 | IN_PROC_BROWSER_TEST_F(WPADHttpProxyScriptBrowserTest, Verify) { |
| 208 | VerifyProxyScript(browser()); |
| 209 | } |
| 210 | #endif // defined(OS_CHROMEOS) |
| 211 | |
Eric Roman | 7193c9f | 2018-11-22 01:39:58 | [diff] [blame] | 212 | // Tests the use of a PAC script that rejects requests to http://www.google.com/ |
| 213 | // when myIpAddress() and myIpAddressEx() appear to be working. |
| 214 | class MyIpAddressProxyScriptBrowserTest |
| 215 | : public BaseHttpProxyScriptBrowserTest { |
| 216 | public: |
| 217 | MyIpAddressProxyScriptBrowserTest() = default; |
| 218 | ~MyIpAddressProxyScriptBrowserTest() override {} |
| 219 | |
| 220 | std::string GetPacFilename() override { |
| 221 | // PAC script that sends all requests to an invalid proxy server provided |
| 222 | // myIpAddress() and myIpAddressEx() are not loopback addresses. |
| 223 | return "my_ip_address.pac"; |
| 224 | } |
| 225 | |
| 226 | private: |
| 227 | DISALLOW_COPY_AND_ASSIGN(MyIpAddressProxyScriptBrowserTest); |
| 228 | }; |
| 229 | |
| 230 | IN_PROC_BROWSER_TEST_F(MyIpAddressProxyScriptBrowserTest, Verify) { |
| 231 | VerifyProxyScript(browser()); |
| 232 | } |
| 233 | |
mmenke | 0a8ca0d1 | 2017-05-03 18:40:07 | [diff] [blame] | 234 | // Fetch PAC script via a hanging http:// URL. |
| 235 | class HangingPacRequestProxyScriptBrowserTest : public InProcessBrowserTest { |
| 236 | public: |
| 237 | HangingPacRequestProxyScriptBrowserTest() {} |
| 238 | ~HangingPacRequestProxyScriptBrowserTest() override {} |
| 239 | |
| 240 | void SetUp() override { |
| 241 | // Must start listening (And get a port for the proxy) before calling |
| 242 | // SetUp(). |
| 243 | ASSERT_TRUE(embedded_test_server()->InitializeAndListen()); |
| 244 | InProcessBrowserTest::SetUp(); |
| 245 | } |
| 246 | |
mmenke | ab0c11d | 2017-05-30 17:15:17 | [diff] [blame] | 247 | void TearDown() override { |
| 248 | // Need to stop this before |connection_listener_| is destroyed. |
| 249 | EXPECT_TRUE(embedded_test_server()->ShutdownAndWaitUntilComplete()); |
| 250 | InProcessBrowserTest::TearDown(); |
| 251 | } |
| 252 | |
mmenke | 0a8ca0d1 | 2017-05-03 18:40:07 | [diff] [blame] | 253 | void SetUpOnMainThread() override { |
| 254 | // This must be created after the main message loop has been set up. |
mmenke | ab0c11d | 2017-05-30 17:15:17 | [diff] [blame] | 255 | // Waits for one connection. Additional connections are fine. |
| 256 | connection_listener_ = |
Jeremy Roman | ec48d7a | 2018-03-01 17:35:09 | [diff] [blame] | 257 | std::make_unique<net::test_server::SimpleConnectionListener>( |
mmenke | ab0c11d | 2017-05-30 17:15:17 | [diff] [blame] | 258 | 1, net::test_server::SimpleConnectionListener:: |
| 259 | ALLOW_ADDITIONAL_CONNECTIONS); |
mmenke | 0a8ca0d1 | 2017-05-03 18:40:07 | [diff] [blame] | 260 | embedded_test_server()->SetConnectionListener(connection_listener_.get()); |
| 261 | embedded_test_server()->StartAcceptingConnections(); |
mmenke | 0a8ca0d1 | 2017-05-03 18:40:07 | [diff] [blame] | 262 | } |
| 263 | |
| 264 | void SetUpCommandLine(base::CommandLine* command_line) override { |
| 265 | command_line->AppendSwitchASCII( |
| 266 | switches::kProxyPacUrl, embedded_test_server()->GetURL("/hung").spec()); |
| 267 | } |
| 268 | |
| 269 | protected: |
mmenke | ab0c11d | 2017-05-30 17:15:17 | [diff] [blame] | 270 | std::unique_ptr<net::test_server::SimpleConnectionListener> |
| 271 | connection_listener_; |
mmenke | 0a8ca0d1 | 2017-05-03 18:40:07 | [diff] [blame] | 272 | |
| 273 | private: |
| 274 | DISALLOW_COPY_AND_ASSIGN(HangingPacRequestProxyScriptBrowserTest); |
| 275 | }; |
| 276 | |
mmenke | 0a8ca0d1 | 2017-05-03 18:40:07 | [diff] [blame] | 277 | // Check that the URLRequest for a PAC that is still alive during shutdown is |
| 278 | // safely cleaned up. This test relies on AssertNoURLRequests being called on |
| 279 | // the main URLRequestContext. |
| 280 | IN_PROC_BROWSER_TEST_F(HangingPacRequestProxyScriptBrowserTest, Shutdown) { |
| 281 | // Request that should hang while trying to request the PAC script. |
| 282 | // Enough requests are created on startup that this probably isn't needed, but |
| 283 | // best to be safe. |
Sergio Villar Senin | c4f55f7 | 2018-07-19 07:49:15 | [diff] [blame] | 284 | auto resource_request = std::make_unique<network::ResourceRequest>(); |
| 285 | resource_request->url = GURL("http://blah/"); |
| 286 | auto simple_loader = network::SimpleURLLoader::Create( |
| 287 | std::move(resource_request), TRAFFIC_ANNOTATION_FOR_TESTS); |
| 288 | |
| 289 | auto* storage_partition = |
| 290 | content::BrowserContext::GetDefaultStoragePartition(browser()->profile()); |
| 291 | auto url_loader_factory = |
| 292 | storage_partition->GetURLLoaderFactoryForBrowserProcess(); |
| 293 | simple_loader->DownloadToStringOfUnboundedSizeUntilCrashAndDie( |
| 294 | url_loader_factory.get(), |
| 295 | base::BindOnce([](std::unique_ptr<std::string> body) { |
| 296 | ADD_FAILURE() << "This request should never complete."; |
| 297 | })); |
mmenke | 0a8ca0d1 | 2017-05-03 18:40:07 | [diff] [blame] | 298 | |
mmenke | ab0c11d | 2017-05-30 17:15:17 | [diff] [blame] | 299 | connection_listener_->WaitForConnections(); |
mmenke | 0a8ca0d1 | 2017-05-03 18:40:07 | [diff] [blame] | 300 | } |
| 301 | |
[email protected] | d46ca730 | 2012-09-08 17:37:24 | [diff] [blame] | 302 | } // namespace |