Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: third_party/WebKit/Source/modules/fetch/BodyStreamBufferTest.cpp

Issue 2181243002: Move ThreadableLoader to Oilpan heap (2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@onheap-bridge-peer-in-worker-threadable-loader
Patch Set: fix Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "modules/fetch/BodyStreamBuffer.h" 5 #include "modules/fetch/BodyStreamBuffer.h"
6 6
7 #include "bindings/core/v8/V8BindingForTesting.h" 7 #include "bindings/core/v8/V8BindingForTesting.h"
8 #include "core/html/FormData.h" 8 #include "core/html/FormData.h"
9 #include "modules/fetch/DataConsumerHandleTestUtil.h" 9 #include "modules/fetch/DataConsumerHandleTestUtil.h"
10 #include "modules/fetch/FetchBlobDataConsumerHandle.h" 10 #include "modules/fetch/FetchBlobDataConsumerHandle.h"
(...skipping 16 matching lines...) Expand all
27 using ::testing::Return; 27 using ::testing::Return;
28 using ::testing::_; 28 using ::testing::_;
29 using ::testing::SaveArg; 29 using ::testing::SaveArg;
30 using Checkpoint = ::testing::StrictMock<::testing::MockFunction<void(int)>>; 30 using Checkpoint = ::testing::StrictMock<::testing::MockFunction<void(int)>>;
31 using Command = DataConsumerHandleTestUtil::Command; 31 using Command = DataConsumerHandleTestUtil::Command;
32 using ReplayingHandle = DataConsumerHandleTestUtil::ReplayingHandle; 32 using ReplayingHandle = DataConsumerHandleTestUtil::ReplayingHandle;
33 using MockFetchDataLoaderClient = DataConsumerHandleTestUtil::MockFetchDataLoade rClient; 33 using MockFetchDataLoaderClient = DataConsumerHandleTestUtil::MockFetchDataLoade rClient;
34 34
35 class FakeLoaderFactory : public FetchBlobDataConsumerHandle::LoaderFactory { 35 class FakeLoaderFactory : public FetchBlobDataConsumerHandle::LoaderFactory {
36 public: 36 public:
37 std::unique_ptr<ThreadableLoader> create(ExecutionContext&, ThreadableLoader Client*, const ThreadableLoaderOptions&, const ResourceLoaderOptions&) override 37 ThreadableLoader* create(ExecutionContext&, ThreadableLoaderClient*, const T hreadableLoaderOptions&, const ResourceLoaderOptions&) override
38 { 38 {
39 ASSERT_NOT_REACHED(); 39 ASSERT_NOT_REACHED();
40 return nullptr; 40 return nullptr;
41 } 41 }
42 }; 42 };
43 43
44 class BodyStreamBufferTest : public ::testing::Test { 44 class BodyStreamBufferTest : public ::testing::Test {
45 protected: 45 protected:
46 ScriptValue eval(ScriptState* scriptState, const char* s) 46 ScriptValue eval(ScriptState* scriptState, const char* s)
47 { 47 {
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 BodyStreamBuffer* buffer = new BodyStreamBuffer(scope.getScriptState(), std: :move(handle)); 500 BodyStreamBuffer* buffer = new BodyStreamBuffer(scope.getScriptState(), std: :move(handle));
501 checkpoint.Call(1); 501 checkpoint.Call(1);
502 ScriptValue reason(scope.getScriptState(), v8String(scope.getScriptState()-> isolate(), "reason")); 502 ScriptValue reason(scope.getScriptState(), v8String(scope.getScriptState()-> isolate(), "reason"));
503 buffer->cancelSource(scope.getScriptState(), reason); 503 buffer->cancelSource(scope.getScriptState(), reason);
504 checkpoint.Call(2); 504 checkpoint.Call(2);
505 } 505 }
506 506
507 } // namespace 507 } // namespace
508 508
509 } // namespace blink 509 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698