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

Unified Diff: net/test/spawned_test_server/base_test_server.h

Issue 336263005: Map WebSocket URL schemes to HTTP URL schemes for auth purposes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace accidentally removed #include <string> Created 6 years, 5 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
Index: net/test/spawned_test_server/base_test_server.h
diff --git a/net/test/spawned_test_server/base_test_server.h b/net/test/spawned_test_server/base_test_server.h
index a5e3287786208e98f398a1840501be418fef6928..6dd67db3038a186d192e2e8baee4bf509c9aded8 100644
--- a/net/test/spawned_test_server/base_test_server.h
+++ b/net/test/spawned_test_server/base_test_server.h
@@ -242,6 +242,12 @@ class BaseTestServer {
type == BaseTestServer::TYPE_WSS;
}
+ // Enable HTTP basic authentication. Currently this only works for TYPE_WS and
+ // TYPE_WSS.
+ void set_websocket_basic_auth(bool ws_basic_auth) {
+ ws_basic_auth_ = ws_basic_auth;
+ }
+
protected:
virtual ~BaseTestServer();
Type type() const { return type_; }
@@ -308,6 +314,9 @@ class BaseTestServer {
// Enables logging of the server to the console.
bool log_to_console_;
+ // Is WebSocket basic HTTP authentication enabled?
+ bool ws_basic_auth_;
+
scoped_ptr<ScopedPortException> allowed_port_;
DISALLOW_COPY_AND_ASSIGN(BaseTestServer);

Powered by Google App Engine
This is Rietveld 408576698