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 "content/child/web_data_consumer_handle_impl.h" | 5 #include "content/child/web_data_consumer_handle_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 #include <utility> | 13 #include <utility> |
14 | 14 |
15 #include "base/bind.h" | 15 #include "base/bind.h" |
16 #include "base/location.h" | 16 #include "base/location.h" |
17 #include "base/memory/ptr_util.h" | 17 #include "base/memory/ptr_util.h" |
| 18 #include "base/message_loop/message_loop.h" |
18 #include "base/run_loop.h" | 19 #include "base/run_loop.h" |
19 #include "base/single_thread_task_runner.h" | 20 #include "base/single_thread_task_runner.h" |
20 #include "base/synchronization/waitable_event.h" | 21 #include "base/synchronization/waitable_event.h" |
21 #include "base/threading/thread.h" | 22 #include "base/threading/thread.h" |
22 #include "base/threading/thread_task_runner_handle.h" | 23 #include "base/threading/thread_task_runner_handle.h" |
23 #include "mojo/public/cpp/system/data_pipe.h" | 24 #include "mojo/public/cpp/system/data_pipe.h" |
24 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
25 | 26 |
26 namespace content { | 27 namespace content { |
27 | 28 |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 EXPECT_EQ(data_size, read_size); | 306 EXPECT_EQ(data_size, read_size); |
306 EXPECT_EQ(expected, std::string(buffer, read_size)); | 307 EXPECT_EQ(expected, std::string(buffer, read_size)); |
307 | 308 |
308 rv = reader->Read(nullptr, 0, WebDataConsumerHandle::kFlagNone, &read_size); | 309 rv = reader->Read(nullptr, 0, WebDataConsumerHandle::kFlagNone, &read_size); |
309 EXPECT_EQ(WebDataConsumerHandle::Result::kDone, rv); | 310 EXPECT_EQ(WebDataConsumerHandle::Result::kDone, rv); |
310 } | 311 } |
311 | 312 |
312 } // namespace | 313 } // namespace |
313 | 314 |
314 } // namespace content | 315 } // namespace content |
OLD | NEW |