OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "headless/public/util/generic_url_request_job.h" | 5 #include "headless/public/util/generic_url_request_job.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/json/json_reader.h" | 11 #include "base/json/json_reader.h" |
12 #include "base/json/json_writer.h" | 12 #include "base/json/json_writer.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
| 14 #include "base/message_loop/message_loop.h" |
14 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
15 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" |
16 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
17 #include "base/values.h" | 18 #include "base/values.h" |
18 #include "headless/public/util/expedited_dispatcher.h" | 19 #include "headless/public/util/expedited_dispatcher.h" |
19 #include "headless/public/util/testing/generic_url_request_mocks.h" | 20 #include "headless/public/util/testing/generic_url_request_mocks.h" |
20 #include "headless/public/util/url_fetcher.h" | 21 #include "headless/public/util/url_fetcher.h" |
21 #include "net/base/elements_upload_data_stream.h" | 22 #include "net/base/elements_upload_data_stream.h" |
22 #include "net/base/upload_bytes_element_reader.h" | 23 #include "net/base/upload_bytes_element_reader.h" |
23 #include "net/http/http_response_headers.h" | 24 #include "net/http/http_response_headers.h" |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 pending_request->AllowRequest(); | 656 pending_request->AllowRequest(); |
656 }, | 657 }, |
657 &post_data)); | 658 &post_data)); |
658 | 659 |
659 CreateAndCompletePostJob(GURL("https://example.com"), "payload", reply); | 660 CreateAndCompletePostJob(GURL("https://example.com"), "payload", reply); |
660 | 661 |
661 EXPECT_EQ("payload", post_data); | 662 EXPECT_EQ("payload", post_data); |
662 } | 663 } |
663 | 664 |
664 } // namespace headless | 665 } // namespace headless |
OLD | NEW |