OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/devtools/devtools_network_controller.h" | 5 #include "chrome/browser/devtools/devtools_network_controller.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
17 #include "chrome/browser/devtools/devtools_network_conditions.h" | 17 #include "chrome/browser/devtools/devtools_network_conditions.h" |
18 #include "chrome/browser/devtools/devtools_network_interceptor.h" | 18 #include "chrome/browser/devtools/devtools_network_interceptor.h" |
19 #include "chrome/browser/devtools/devtools_network_transaction.h" | 19 #include "chrome/browser/devtools/devtools_network_transaction.h" |
20 #include "chrome/browser/devtools/devtools_network_upload_data_stream.h" | 20 #include "chrome/browser/devtools/devtools_network_upload_data_stream.h" |
21 #include "net/base/chunked_upload_data_stream.h" | 21 #include "net/base/chunked_upload_data_stream.h" |
22 #include "net/http/http_transaction_test_util.h" | 22 #include "net/http/http_transaction_test_util.h" |
| 23 #include "net/log/net_log_with_source.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
24 #include "url/gurl.h" | 25 #include "url/gurl.h" |
25 | 26 |
26 namespace test { | 27 namespace test { |
27 | 28 |
28 using net::kSimpleGET_Transaction; | 29 using net::kSimpleGET_Transaction; |
29 using net::MockHttpRequest; | 30 using net::MockHttpRequest; |
30 using net::MockNetworkLayer; | 31 using net::MockNetworkLayer; |
31 using net::MockTransaction; | 32 using net::MockTransaction; |
32 using net::TEST_MODE_SYNC_NET_START; | 33 using net::TEST_MODE_SYNC_NET_START; |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 | 320 |
320 rv = helper.ReadUploadData(); | 321 rv = helper.ReadUploadData(); |
321 EXPECT_EQ(rv, net::ERR_IO_PENDING); | 322 EXPECT_EQ(rv, net::ERR_IO_PENDING); |
322 EXPECT_EQ(callback->run_count(), 1); | 323 EXPECT_EQ(callback->run_count(), 1); |
323 base::RunLoop().RunUntilIdle(); | 324 base::RunLoop().RunUntilIdle(); |
324 EXPECT_EQ(callback->run_count(), 2); | 325 EXPECT_EQ(callback->run_count(), 2); |
325 EXPECT_EQ(callback->value(), static_cast<int>(arraysize(kUploadData))); | 326 EXPECT_EQ(callback->value(), static_cast<int>(arraysize(kUploadData))); |
326 } | 327 } |
327 | 328 |
328 } // namespace test | 329 } // namespace test |
OLD | NEW |