| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "modules/fetch/BytesConsumerTestUtil.h" | 5 #include "modules/fetch/BytesConsumerTestUtil.h" |
| 6 | 6 |
| 7 #include "core/dom/ExecutionContext.h" | 7 #include "core/dom/ExecutionContext.h" |
| 8 #include "core/dom/TaskRunnerHelper.h" | 8 #include "core/dom/TaskRunnerHelper.h" |
| 9 #include "platform/WebTaskRunner.h" | 9 #include "platform/WebTaskRunner.h" |
| 10 #include "platform/testing/UnitTestHelpers.h" | 10 #include "platform/testing/UnitTestHelpers.h" |
| 11 #include "wtf/Assertions.h" | 11 #include "platform/wtf/Assertions.h" |
| 12 #include "wtf/Functional.h" | 12 #include "platform/wtf/Functional.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 using Result = BytesConsumer::Result; | 16 using Result = BytesConsumer::Result; |
| 17 using ::testing::_; | 17 using ::testing::_; |
| 18 using ::testing::ByMove; | 18 using ::testing::ByMove; |
| 19 using ::testing::DoAll; | 19 using ::testing::DoAll; |
| 20 using ::testing::Return; | 20 using ::testing::Return; |
| 21 using ::testing::SetArgPointee; | 21 using ::testing::SetArgPointee; |
| 22 | 22 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 BytesConsumerTestUtil::TwoPhaseReader::Run() { | 189 BytesConsumerTestUtil::TwoPhaseReader::Run() { |
| 190 OnStateChange(); | 190 OnStateChange(); |
| 191 while (result_ != BytesConsumer::Result::kDone && | 191 while (result_ != BytesConsumer::Result::kDone && |
| 192 result_ != BytesConsumer::Result::kError) | 192 result_ != BytesConsumer::Result::kError) |
| 193 testing::RunPendingTasks(); | 193 testing::RunPendingTasks(); |
| 194 testing::RunPendingTasks(); | 194 testing::RunPendingTasks(); |
| 195 return std::make_pair(result_, std::move(data_)); | 195 return std::make_pair(result_, std::move(data_)); |
| 196 } | 196 } |
| 197 | 197 |
| 198 } // namespace blink | 198 } // namespace blink |
| OLD | NEW |