Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(825)

Unified Diff: net/url_request/url_request_http_job_unittest.cc

Issue 2082603002: Introduce an 'ENABLE_WEBSOCKETS' define in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hsts
Patch Set: URLRequestJobManager Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/net_common.gypi ('k') | net/url_request/url_request_job_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_http_job_unittest.cc
diff --git a/net/url_request/url_request_http_job_unittest.cc b/net/url_request/url_request_http_job_unittest.cc
index 978fae639167e2dcd1cc9945a8ab10cfdde37391..134bf452cc68933efd3daaa0ef3599a95c6ad73f 100644
--- a/net/url_request/url_request_http_job_unittest.cc
+++ b/net/url_request/url_request_http_job_unittest.cc
@@ -648,14 +648,12 @@ TEST_F(URLRequestHttpJobTest, HSTSInternalRedirectTest) {
{"http://upgrade.test:123/", true, "https://upgrade.test:123/"},
{"http://no-upgrade.test/", false, "http://no-upgrade.test/"},
{"http://no-upgrade.test:123/", false, "http://no-upgrade.test:123/"},
-// iOS doesn't support websockets; see the comments above
-// URLRequestHttpJobWebSocketTest for detail.
-#if !defined(OS_IOS)
+#if defined(ENABLE_WEBSOCKETS)
{"ws://upgrade.test/", true, "wss://upgrade.test/"},
{"ws://upgrade.test:123/", true, "wss://upgrade.test:123/"},
{"ws://no-upgrade.test/", false, "ws://no-upgrade.test/"},
{"ws://no-upgrade.test:123/", false, "ws://no-upgrade.test:123/"},
-#endif // !defined(OS_IOS)
+#endif // defined(ENABLE_WEBSOCKETS)
};
for (const auto& test : cases) {
@@ -896,11 +894,7 @@ class MockCreateHelper : public WebSocketHandshakeStreamBase::CreateHelper {
bool));
};
-// iOS doesn't support WebSockets, so these tests fail with ERR_UNKOWN_SCHEME on
-// iOS.
-// TODO(mmenke): Hard coding features based on OS is regression prone and ugly.
-// Seems like this should use a build flag instead.
-#if !defined(OS_IOS)
+#if defined(ENABLE_WEBSOCKETS)
class FakeWebSocketHandshakeStream : public WebSocketHandshakeStreamBase {
public:
@@ -1009,7 +1003,7 @@ TEST_F(URLRequestHttpJobWebSocketTest, CreateHelperPassedThrough) {
EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called());
}
-#endif // !defined(OS_IOS)
+#endif // defined(ENABLE_WEBSOCKETS)
} // namespace
« no previous file with comments | « net/net_common.gypi ('k') | net/url_request/url_request_job_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698