| 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/ReadableStreamBytesConsumer.h" | 5 #include "modules/fetch/ReadableStreamBytesConsumer.h" |
| 6 | 6 |
| 7 #include <v8.h> |
| 8 #include <memory> |
| 7 #include "bindings/core/v8/ScriptState.h" | 9 #include "bindings/core/v8/ScriptState.h" |
| 8 #include "bindings/core/v8/V8BindingMacros.h" | 10 #include "bindings/core/v8/V8BindingMacros.h" |
| 9 #include "bindings/core/v8/V8GCController.h" | 11 #include "bindings/core/v8/V8GCController.h" |
| 10 #include "core/dom/Document.h" | 12 #include "core/dom/Document.h" |
| 11 #include "core/streams/ReadableStreamOperations.h" | 13 #include "core/streams/ReadableStreamOperations.h" |
| 12 #include "core/testing/DummyPageHolder.h" | 14 #include "core/testing/DummyPageHolder.h" |
| 13 #include "modules/fetch/BytesConsumerTestUtil.h" | 15 #include "modules/fetch/BytesConsumerTestUtil.h" |
| 14 #include "platform/heap/Handle.h" | 16 #include "platform/heap/Handle.h" |
| 15 #include "platform/testing/UnitTestHelpers.h" | 17 #include "platform/testing/UnitTestHelpers.h" |
| 16 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 18 #include <memory> | |
| 19 #include <v8.h> | |
| 20 | 20 |
| 21 namespace blink { | 21 namespace blink { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 using ::testing::InSequence; | 25 using ::testing::InSequence; |
| 26 using ::testing::StrictMock; | 26 using ::testing::StrictMock; |
| 27 using Checkpoint = StrictMock<::testing::MockFunction<void(int)>>; | 27 using Checkpoint = StrictMock<::testing::MockFunction<void(int)>>; |
| 28 using Result = BytesConsumer::Result; | 28 using Result = BytesConsumer::Result; |
| 29 using PublicState = BytesConsumer::PublicState; | 29 using PublicState = BytesConsumer::PublicState; |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 checkpoint.Call(3); | 368 checkpoint.Call(3); |
| 369 testing::runPendingTasks(); | 369 testing::runPendingTasks(); |
| 370 checkpoint.Call(4); | 370 checkpoint.Call(4); |
| 371 EXPECT_EQ(PublicState::Errored, consumer->getPublicState()); | 371 EXPECT_EQ(PublicState::Errored, consumer->getPublicState()); |
| 372 EXPECT_EQ(Result::Error, consumer->beginRead(&buffer, &available)); | 372 EXPECT_EQ(Result::Error, consumer->beginRead(&buffer, &available)); |
| 373 } | 373 } |
| 374 | 374 |
| 375 } // namespace | 375 } // namespace |
| 376 | 376 |
| 377 } // namespace blink | 377 } // namespace blink |
| OLD | NEW |