| 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 "modules/fetch/BytesConsumer.h" | 5 #include "modules/fetch/BytesConsumer.h" |
| 6 | 6 |
| 7 #include "core/testing/DummyPageHolder.h" | 7 #include "core/testing/DummyPageHolder.h" |
| 8 #include "modules/fetch/BytesConsumerTestUtil.h" | 8 #include "modules/fetch/BytesConsumerTestUtil.h" |
| 9 #include "platform/blob/BlobData.h" | 9 #include "platform/blob/BlobData.h" |
| 10 #include "platform/testing/UnitTestHelpers.h" | 10 #include "platform/testing/UnitTestHelpers.h" |
| 11 #include "platform/wtf/RefPtr.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "wtf/RefPtr.h" | |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 using Command = BytesConsumerTestUtil::Command; | 18 using Command = BytesConsumerTestUtil::Command; |
| 19 using Result = BytesConsumer::Result; | 19 using Result = BytesConsumer::Result; |
| 20 using ReplayingBytesConsumer = BytesConsumerTestUtil::ReplayingBytesConsumer; | 20 using ReplayingBytesConsumer = BytesConsumerTestUtil::ReplayingBytesConsumer; |
| 21 | 21 |
| 22 String ToString(const Vector<char>& v) { | 22 String ToString(const Vector<char>& v) { |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 EXPECT_EQ(BytesConsumer::PublicState::kErrored, consumer->GetPublicState()); | 427 EXPECT_EQ(BytesConsumer::PublicState::kErrored, consumer->GetPublicState()); |
| 428 EXPECT_EQ(error.Message(), consumer->GetError().Message()); | 428 EXPECT_EQ(error.Message(), consumer->GetError().Message()); |
| 429 | 429 |
| 430 consumer->Cancel(); | 430 consumer->Cancel(); |
| 431 EXPECT_EQ(BytesConsumer::PublicState::kErrored, consumer->GetPublicState()); | 431 EXPECT_EQ(BytesConsumer::PublicState::kErrored, consumer->GetPublicState()); |
| 432 } | 432 } |
| 433 | 433 |
| 434 } // namespace | 434 } // namespace |
| 435 | 435 |
| 436 } // namespace blink | 436 } // namespace blink |
| OLD | NEW |