// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef NET_TEST_EMBEDDED_TEST_SERVER_CONTROLLABLE_HTTP_RESPONSE_H_ #define NET_TEST_EMBEDDED_TEST_SERVER_CONTROLLABLE_HTTP_RESPONSE_H_ #include <memory> #include <string> #include <vector> #include "base/memory/scoped_refptr.h" #include "base/memory/weak_ptr.h" #include "base/run_loop.h" #include "base/sequence_checker.h" #include "base/task/single_thread_task_runner.h" #include "net/http/http_status_code.h" #include "net/test/embedded_test_server/embedded_test_server.h" #include "net/test/embedded_test_server/http_request.h" #include "net/test/embedded_test_server/http_response.h" namespace net::test_server { // A response that can be manually controlled on the current test thread. It is // used for waiting for a connection, sending data and closing it. It will // handle only **one** request with the matching |relative_url|. In the case of // multiple ControllableHttpResponses for the same path, they're used in the // order they were created. // // If |relative_url_is_prefix| is true, |relative_url| is only compared against // the start of the URL being requested, which allows matching against (possibly // variable) query strings, for instance. class ControllableHttpResponse { … }; } // namespace net::test_server #endif // NET_TEST_EMBEDDED_TEST_SERVER_CONTROLLABLE_HTTP_RESPONSE_H_