Index: headless/test/test_protocol_handler.cc |
diff --git a/headless/test/test_protocol_handler.cc b/headless/test/test_protocol_handler.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4752f91b3417e6c075d3227f3f11ab2798b8cb37 |
--- /dev/null |
+++ b/headless/test/test_protocol_handler.cc |
@@ -0,0 +1,20 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "headless/test/test_protocol_handler.h" |
+ |
+#include "headless/test/test_url_request_job.h" |
+ |
+namespace headless { |
+ |
+TestProtocolHandler::TestProtocolHandler(const std::string& body) |
+ : body_(body) {} |
+ |
+net::URLRequestJob* TestProtocolHandler::MaybeCreateJob( |
+ net::URLRequest* request, |
+ net::NetworkDelegate* network_delegate) const { |
+ return new TestURLRequestJob(request, network_delegate, body_); |
+} |
+ |
+} // namespace headless |