| 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/FetchBlobDataConsumerHandle.h" | 5 #include "modules/fetch/FetchBlobDataConsumerHandle.h" |
| 6 | 6 |
| 7 #include "core/dom/ExecutionContext.h" | 7 #include "core/dom/ExecutionContext.h" |
| 8 #include "core/fetch/ResourceLoaderOptions.h" | 8 #include "core/fetch/ResourceLoaderOptions.h" |
| 9 #include "core/loader/MockThreadableLoader.h" | 9 #include "core/loader/MockThreadableLoader.h" |
| 10 #include "core/loader/ThreadableLoaderClient.h" | 10 #include "core/loader/ThreadableLoaderClient.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 Return(loader.get()))); | 105 Return(loader.get()))); |
| 106 EXPECT_CALL(*loader, start(_)).WillOnce(SaveArg<0>(&request)); | 106 EXPECT_CALL(*loader, start(_)).WillOnce(SaveArg<0>(&request)); |
| 107 EXPECT_CALL(checkpoint, Call(2)); | 107 EXPECT_CALL(checkpoint, Call(2)); |
| 108 EXPECT_CALL(*loader, cancel()); | 108 EXPECT_CALL(*loader, cancel()); |
| 109 | 109 |
| 110 RefPtr<BlobDataHandle> blobDataHandle = createBlobDataHandle("Once upon a ti
me"); | 110 RefPtr<BlobDataHandle> blobDataHandle = createBlobDataHandle("Once upon a ti
me"); |
| 111 std::unique_ptr<WebDataConsumerHandle> handle | 111 std::unique_ptr<WebDataConsumerHandle> handle |
| 112 = FetchBlobDataConsumerHandle::create(&document(), blobDataHandle, facto
ry); | 112 = FetchBlobDataConsumerHandle::create(&document(), blobDataHandle, facto
ry); |
| 113 testing::runPendingTasks(); | 113 testing::runPendingTasks(); |
| 114 | 114 |
| 115 char buffer[1]; | |
| 116 size_t size = 0; | 115 size_t size = 0; |
| 117 ASSERT_EQ(kShouldWait, handle->obtainReader(nullptr)->read(buffer, sizeof(bu
ffer), kNone, &size)); | 116 handle->obtainReader(nullptr)->read(nullptr, 0, kNone, &size); |
| 118 checkpoint.Call(1); | 117 checkpoint.Call(1); |
| 119 testing::runPendingTasks(); | 118 testing::runPendingTasks(); |
| 120 checkpoint.Call(2); | 119 checkpoint.Call(2); |
| 121 | 120 |
| 122 EXPECT_TRUE(request.url().getString().startsWith("blob:")); | 121 EXPECT_TRUE(request.url().getString().startsWith("blob:")); |
| 123 EXPECT_TRUE(request.useStreamOnResponse()); | 122 EXPECT_TRUE(request.useStreamOnResponse()); |
| 124 | 123 |
| 125 EXPECT_EQ(ConsiderPreflight, options.preflightPolicy); | 124 EXPECT_EQ(ConsiderPreflight, options.preflightPolicy); |
| 126 EXPECT_EQ(DenyCrossOriginRequests, options.crossOriginRequestPolicy); | 125 EXPECT_EQ(DenyCrossOriginRequests, options.crossOriginRequestPolicy); |
| 127 EXPECT_EQ(DoNotEnforceContentSecurityPolicy, options.contentSecurityPolicyEn
forcement); | 126 EXPECT_EQ(DoNotEnforceContentSecurityPolicy, options.contentSecurityPolicyEn
forcement); |
| 128 | 127 |
| 129 EXPECT_EQ(DoNotBufferData, resourceLoaderOptions.dataBufferingPolicy); | 128 EXPECT_EQ(DoNotBufferData, resourceLoaderOptions.dataBufferingPolicy); |
| 130 EXPECT_EQ(DoNotAllowStoredCredentials, resourceLoaderOptions.allowCredential
s); | 129 EXPECT_EQ(DoNotAllowStoredCredentials, resourceLoaderOptions.allowCredential
s); |
| 131 EXPECT_EQ(ClientDidNotRequestCredentials, resourceLoaderOptions.credentialsR
equested); | 130 EXPECT_EQ(ClientDidNotRequestCredentials, resourceLoaderOptions.credentialsR
equested); |
| 132 EXPECT_EQ(CheckContentSecurityPolicy, resourceLoaderOptions.contentSecurityP
olicyOption); | 131 EXPECT_EQ(CheckContentSecurityPolicy, resourceLoaderOptions.contentSecurityP
olicyOption); |
| 133 EXPECT_EQ(DocumentContext, resourceLoaderOptions.requestInitiatorContext); | 132 EXPECT_EQ(DocumentContext, resourceLoaderOptions.requestInitiatorContext); |
| 134 EXPECT_EQ(RequestAsynchronously, resourceLoaderOptions.synchronousPolicy); | 133 EXPECT_EQ(RequestAsynchronously, resourceLoaderOptions.synchronousPolicy); |
| 135 EXPECT_EQ(NotCORSEnabled, resourceLoaderOptions.corsEnabled); | 134 EXPECT_EQ(NotCORSEnabled, resourceLoaderOptions.corsEnabled); |
| 136 } | 135 } |
| 137 | 136 |
| 138 TEST_F(FetchBlobDataConsumerHandleTest, ZeroByteReadDoesNotCreateLoader) | |
| 139 { | |
| 140 auto factory = new StrictMock<MockLoaderFactory>; | |
| 141 Checkpoint checkpoint; | |
| 142 | |
| 143 InSequence s; | |
| 144 EXPECT_CALL(checkpoint, Call(1)); | |
| 145 EXPECT_CALL(checkpoint, Call(2)); | |
| 146 | |
| 147 RefPtr<BlobDataHandle> blobDataHandle = createBlobDataHandle("Once upon a ti
me"); | |
| 148 std::unique_ptr<WebDataConsumerHandle> handle | |
| 149 = FetchBlobDataConsumerHandle::create(&document(), blobDataHandle, facto
ry); | |
| 150 testing::runPendingTasks(); | |
| 151 | |
| 152 size_t size = 0; | |
| 153 ASSERT_EQ(kShouldWait, handle->obtainReader(nullptr)->read(nullptr, 0, kNone
, &size)); | |
| 154 checkpoint.Call(1); | |
| 155 testing::runPendingTasks(); | |
| 156 checkpoint.Call(2); | |
| 157 } | |
| 158 | |
| 159 TEST_F(FetchBlobDataConsumerHandleTest, CancelLoaderWhenStopped) | 137 TEST_F(FetchBlobDataConsumerHandleTest, CancelLoaderWhenStopped) |
| 160 { | 138 { |
| 161 auto factory = new StrictMock<MockLoaderFactory>; | 139 auto factory = new StrictMock<MockLoaderFactory>; |
| 162 Checkpoint checkpoint; | 140 Checkpoint checkpoint; |
| 163 | 141 |
| 164 Persistent<MockThreadableLoader> loader = MockThreadableLoader::create(); | 142 Persistent<MockThreadableLoader> loader = MockThreadableLoader::create(); |
| 165 | 143 |
| 166 InSequence s; | 144 InSequence s; |
| 167 EXPECT_CALL(checkpoint, Call(1)); | 145 EXPECT_CALL(checkpoint, Call(1)); |
| 168 EXPECT_CALL(*factory, create(Ref(document()), _, _, _)).WillOnce(Return(load
er.get())); | 146 EXPECT_CALL(*factory, create(Ref(document()), _, _, _)).WillOnce(Return(load
er.get())); |
| 169 EXPECT_CALL(*loader, start(_)); | 147 EXPECT_CALL(*loader, start(_)); |
| 170 EXPECT_CALL(checkpoint, Call(2)); | 148 EXPECT_CALL(checkpoint, Call(2)); |
| 171 EXPECT_CALL(*loader, cancel()); | 149 EXPECT_CALL(*loader, cancel()); |
| 172 EXPECT_CALL(checkpoint, Call(3)); | 150 EXPECT_CALL(checkpoint, Call(3)); |
| 173 | 151 |
| 174 RefPtr<BlobDataHandle> blobDataHandle = createBlobDataHandle("Once upon a ti
me"); | 152 RefPtr<BlobDataHandle> blobDataHandle = createBlobDataHandle("Once upon a ti
me"); |
| 175 std::unique_ptr<WebDataConsumerHandle> handle | 153 std::unique_ptr<WebDataConsumerHandle> handle |
| 176 = FetchBlobDataConsumerHandle::create(&document(), blobDataHandle, facto
ry); | 154 = FetchBlobDataConsumerHandle::create(&document(), blobDataHandle, facto
ry); |
| 177 testing::runPendingTasks(); | 155 testing::runPendingTasks(); |
| 178 | 156 |
| 179 char buffer[1]; | |
| 180 size_t size = 0; | 157 size_t size = 0; |
| 181 ASSERT_EQ(kShouldWait, handle->obtainReader(nullptr)->read(buffer, sizeof(bu
ffer), kNone, &size)); | 158 handle->obtainReader(nullptr)->read(nullptr, 0, kNone, &size); |
| 182 checkpoint.Call(1); | 159 checkpoint.Call(1); |
| 183 testing::runPendingTasks(); | 160 testing::runPendingTasks(); |
| 184 checkpoint.Call(2); | 161 checkpoint.Call(2); |
| 185 document().stopActiveDOMObjects(); | 162 document().stopActiveDOMObjects(); |
| 186 checkpoint.Call(3); | 163 checkpoint.Call(3); |
| 187 } | 164 } |
| 188 | 165 |
| 189 TEST_F(FetchBlobDataConsumerHandleTest, CancelLoaderWhenDestinationDetached) | 166 TEST_F(FetchBlobDataConsumerHandleTest, CancelLoaderWhenDestinationDetached) |
| 190 { | 167 { |
| 191 auto factory = new StrictMock<MockLoaderFactory>; | 168 auto factory = new StrictMock<MockLoaderFactory>; |
| 192 Checkpoint checkpoint; | 169 Checkpoint checkpoint; |
| 193 | 170 |
| 194 Persistent<MockThreadableLoader> loader = MockThreadableLoader::create(); | 171 Persistent<MockThreadableLoader> loader = MockThreadableLoader::create(); |
| 195 | 172 |
| 196 InSequence s; | 173 InSequence s; |
| 197 EXPECT_CALL(checkpoint, Call(1)); | 174 EXPECT_CALL(checkpoint, Call(1)); |
| 198 EXPECT_CALL(*factory, create(Ref(document()), _, _, _)).WillOnce(Return(load
er.get())); | 175 EXPECT_CALL(*factory, create(Ref(document()), _, _, _)).WillOnce(Return(load
er.get())); |
| 199 EXPECT_CALL(*loader, start(_)); | 176 EXPECT_CALL(*loader, start(_)); |
| 200 EXPECT_CALL(checkpoint, Call(2)); | 177 EXPECT_CALL(checkpoint, Call(2)); |
| 201 EXPECT_CALL(checkpoint, Call(3)); | 178 EXPECT_CALL(checkpoint, Call(3)); |
| 202 EXPECT_CALL(*loader, cancel()); | 179 EXPECT_CALL(*loader, cancel()); |
| 203 EXPECT_CALL(checkpoint, Call(4)); | 180 EXPECT_CALL(checkpoint, Call(4)); |
| 204 | 181 |
| 205 RefPtr<BlobDataHandle> blobDataHandle = createBlobDataHandle("Once upon a ti
me"); | 182 RefPtr<BlobDataHandle> blobDataHandle = createBlobDataHandle("Once upon a ti
me"); |
| 206 std::unique_ptr<WebDataConsumerHandle> handle | 183 std::unique_ptr<WebDataConsumerHandle> handle |
| 207 = FetchBlobDataConsumerHandle::create(&document(), blobDataHandle, facto
ry); | 184 = FetchBlobDataConsumerHandle::create(&document(), blobDataHandle, facto
ry); |
| 208 std::unique_ptr<WebDataConsumerHandle::Reader> reader = handle->obtainReader
(nullptr); | 185 std::unique_ptr<WebDataConsumerHandle::Reader> reader = handle->obtainReader
(nullptr); |
| 209 testing::runPendingTasks(); | 186 testing::runPendingTasks(); |
| 210 | 187 |
| 211 char buffer[1]; | |
| 212 size_t size = 0; | 188 size_t size = 0; |
| 213 ASSERT_EQ(kShouldWait, reader->read(buffer, sizeof(buffer), kNone, &size)); | 189 reader->read(nullptr, 0, kNone, &size); |
| 214 checkpoint.Call(1); | 190 checkpoint.Call(1); |
| 215 testing::runPendingTasks(); | 191 testing::runPendingTasks(); |
| 216 checkpoint.Call(2); | 192 checkpoint.Call(2); |
| 217 handle = nullptr; | 193 handle = nullptr; |
| 218 reader = nullptr; | 194 reader = nullptr; |
| 219 checkpoint.Call(3); | 195 checkpoint.Call(3); |
| 220 ThreadHeap::collectAllGarbage(); | 196 ThreadHeap::collectAllGarbage(); |
| 221 checkpoint.Call(4); | 197 checkpoint.Call(4); |
| 222 } | 198 } |
| 223 | 199 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 240 std::unique_ptr<WebDataConsumerHandle> handle | 216 std::unique_ptr<WebDataConsumerHandle> handle |
| 241 = FetchBlobDataConsumerHandle::create(&document(), blobDataHandle, facto
ry); | 217 = FetchBlobDataConsumerHandle::create(&document(), blobDataHandle, facto
ry); |
| 242 | 218 |
| 243 std::unique_ptr<ReplayingHandle> src = ReplayingHandle::create(); | 219 std::unique_ptr<ReplayingHandle> src = ReplayingHandle::create(); |
| 244 src->add(Command(Command::Wait)); | 220 src->add(Command(Command::Wait)); |
| 245 src->add(Command(Command::Data, "hello, ")); | 221 src->add(Command(Command::Data, "hello, ")); |
| 246 src->add(Command(Command::Data, "world")); | 222 src->add(Command(Command::Data, "world")); |
| 247 src->add(Command(Command::Wait)); | 223 src->add(Command(Command::Wait)); |
| 248 src->add(Command(Command::Done)); | 224 src->add(Command(Command::Done)); |
| 249 | 225 |
| 250 char buffer[1]; | |
| 251 size_t size = 0; | 226 size_t size = 0; |
| 252 ASSERT_EQ(kShouldWait, handle->obtainReader(nullptr)->read(buffer, sizeof(bu
ffer), kNone, &size)); | 227 handle->obtainReader(nullptr)->read(nullptr, 0, kNone, &size); |
| 253 checkpoint.Call(1); | 228 checkpoint.Call(1); |
| 254 testing::runPendingTasks(); | 229 testing::runPendingTasks(); |
| 255 checkpoint.Call(2); | 230 checkpoint.Call(2); |
| 256 client->didReceiveResponse(0, ResourceResponse(), std::move(src)); | 231 client->didReceiveResponse(0, ResourceResponse(), std::move(src)); |
| 257 HandleReaderRunner<HandleReader> runner(std::move(handle)); | 232 HandleReaderRunner<HandleReader> runner(std::move(handle)); |
| 258 std::unique_ptr<HandleReadResult> r = runner.wait(); | 233 std::unique_ptr<HandleReadResult> r = runner.wait(); |
| 259 EXPECT_EQ(kDone, r->result()); | 234 EXPECT_EQ(kDone, r->result()); |
| 260 EXPECT_EQ("hello, world", toString(r->data())); | 235 EXPECT_EQ("hello, world", toString(r->data())); |
| 261 } | 236 } |
| 262 | 237 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 279 std::unique_ptr<WebDataConsumerHandle> handle | 254 std::unique_ptr<WebDataConsumerHandle> handle |
| 280 = FetchBlobDataConsumerHandle::create(&document(), blobDataHandle, facto
ry); | 255 = FetchBlobDataConsumerHandle::create(&document(), blobDataHandle, facto
ry); |
| 281 | 256 |
| 282 std::unique_ptr<ReplayingHandle> src = ReplayingHandle::create(); | 257 std::unique_ptr<ReplayingHandle> src = ReplayingHandle::create(); |
| 283 src->add(Command(Command::Wait)); | 258 src->add(Command(Command::Wait)); |
| 284 src->add(Command(Command::Data, "hello, ")); | 259 src->add(Command(Command::Data, "hello, ")); |
| 285 src->add(Command(Command::Data, "world")); | 260 src->add(Command(Command::Data, "world")); |
| 286 src->add(Command(Command::Wait)); | 261 src->add(Command(Command::Wait)); |
| 287 src->add(Command(Command::Done)); | 262 src->add(Command(Command::Done)); |
| 288 | 263 |
| 289 char buffer[1]; | |
| 290 size_t size = 0; | 264 size_t size = 0; |
| 291 ASSERT_EQ(kShouldWait, handle->obtainReader(nullptr)->read(buffer, sizeof(bu
ffer), kNone, &size)); | 265 handle->obtainReader(nullptr)->read(nullptr, 0, kNone, &size); |
| 292 checkpoint.Call(1); | 266 checkpoint.Call(1); |
| 293 testing::runPendingTasks(); | 267 testing::runPendingTasks(); |
| 294 checkpoint.Call(2); | 268 checkpoint.Call(2); |
| 295 client->didReceiveResponse(0, ResourceResponse(), std::move(src)); | 269 client->didReceiveResponse(0, ResourceResponse(), std::move(src)); |
| 296 HandleReaderRunner<HandleTwoPhaseReader> runner(std::move(handle)); | 270 HandleReaderRunner<HandleTwoPhaseReader> runner(std::move(handle)); |
| 297 std::unique_ptr<HandleReadResult> r = runner.wait(); | 271 std::unique_ptr<HandleReadResult> r = runner.wait(); |
| 298 EXPECT_EQ(kDone, r->result()); | 272 EXPECT_EQ(kDone, r->result()); |
| 299 EXPECT_EQ("hello, world", toString(r->data())); | 273 EXPECT_EQ("hello, world", toString(r->data())); |
| 300 } | 274 } |
| 301 | 275 |
| 302 TEST_F(FetchBlobDataConsumerHandleTest, LoadErrorTest) | 276 TEST_F(FetchBlobDataConsumerHandleTest, LoadErrorTest) |
| 303 { | 277 { |
| 304 auto factory = new StrictMock<MockLoaderFactory>; | 278 auto factory = new StrictMock<MockLoaderFactory>; |
| 305 Checkpoint checkpoint; | 279 Checkpoint checkpoint; |
| 306 | 280 |
| 307 Persistent<MockThreadableLoader> loader = MockThreadableLoader::create(); | 281 Persistent<MockThreadableLoader> loader = MockThreadableLoader::create(); |
| 308 ThreadableLoaderClient* client = nullptr; | 282 ThreadableLoaderClient* client = nullptr; |
| 309 | 283 |
| 310 InSequence s; | 284 InSequence s; |
| 311 EXPECT_CALL(checkpoint, Call(1)); | 285 EXPECT_CALL(checkpoint, Call(1)); |
| 312 EXPECT_CALL(*factory, create(Ref(document()), _, _, _)).WillOnce(DoAll(SaveA
rg<1>(&client), Return(loader.get()))); | 286 EXPECT_CALL(*factory, create(Ref(document()), _, _, _)).WillOnce(DoAll(SaveA
rg<1>(&client), Return(loader.get()))); |
| 313 EXPECT_CALL(*loader, start(_)); | 287 EXPECT_CALL(*loader, start(_)); |
| 314 EXPECT_CALL(checkpoint, Call(2)); | 288 EXPECT_CALL(checkpoint, Call(2)); |
| 315 | 289 |
| 316 RefPtr<BlobDataHandle> blobDataHandle = createBlobDataHandle("Once upon a ti
me"); | 290 RefPtr<BlobDataHandle> blobDataHandle = createBlobDataHandle("Once upon a ti
me"); |
| 317 std::unique_ptr<WebDataConsumerHandle> handle | 291 std::unique_ptr<WebDataConsumerHandle> handle |
| 318 = FetchBlobDataConsumerHandle::create(&document(), blobDataHandle, facto
ry); | 292 = FetchBlobDataConsumerHandle::create(&document(), blobDataHandle, facto
ry); |
| 319 | 293 |
| 320 char buffer[1]; | |
| 321 size_t size = 0; | 294 size_t size = 0; |
| 322 ASSERT_EQ(kShouldWait, handle->obtainReader(nullptr)->read(buffer, sizeof(bu
ffer), kNone, &size)); | 295 handle->obtainReader(nullptr)->read(nullptr, 0, kNone, &size); |
| 323 checkpoint.Call(1); | 296 checkpoint.Call(1); |
| 324 testing::runPendingTasks(); | 297 testing::runPendingTasks(); |
| 325 checkpoint.Call(2); | 298 checkpoint.Call(2); |
| 326 client->didFail(ResourceError()); | 299 client->didFail(ResourceError()); |
| 327 HandleReaderRunner<HandleReader> runner(std::move(handle)); | 300 HandleReaderRunner<HandleReader> runner(std::move(handle)); |
| 328 std::unique_ptr<HandleReadResult> r = runner.wait(); | 301 std::unique_ptr<HandleReadResult> r = runner.wait(); |
| 329 EXPECT_EQ(kUnexpectedError, r->result()); | 302 EXPECT_EQ(kUnexpectedError, r->result()); |
| 330 } | 303 } |
| 331 | 304 |
| 332 TEST_F(FetchBlobDataConsumerHandleTest, BodyLoadErrorTest) | 305 TEST_F(FetchBlobDataConsumerHandleTest, BodyLoadErrorTest) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 346 | 319 |
| 347 RefPtr<BlobDataHandle> blobDataHandle = createBlobDataHandle("Once upon a ti
me"); | 320 RefPtr<BlobDataHandle> blobDataHandle = createBlobDataHandle("Once upon a ti
me"); |
| 348 std::unique_ptr<WebDataConsumerHandle> handle | 321 std::unique_ptr<WebDataConsumerHandle> handle |
| 349 = FetchBlobDataConsumerHandle::create(&document(), blobDataHandle, facto
ry); | 322 = FetchBlobDataConsumerHandle::create(&document(), blobDataHandle, facto
ry); |
| 350 | 323 |
| 351 std::unique_ptr<ReplayingHandle> src = ReplayingHandle::create(); | 324 std::unique_ptr<ReplayingHandle> src = ReplayingHandle::create(); |
| 352 src->add(Command(Command::Wait)); | 325 src->add(Command(Command::Wait)); |
| 353 src->add(Command(Command::Data, "hello, ")); | 326 src->add(Command(Command::Data, "hello, ")); |
| 354 src->add(Command(Command::Error)); | 327 src->add(Command(Command::Error)); |
| 355 | 328 |
| 356 char buffer[1]; | |
| 357 size_t size = 0; | 329 size_t size = 0; |
| 358 ASSERT_EQ(kShouldWait, handle->obtainReader(nullptr)->read(buffer, sizeof(bu
ffer), kNone, &size)); | 330 handle->obtainReader(nullptr)->read(nullptr, 0, kNone, &size); |
| 359 checkpoint.Call(1); | 331 checkpoint.Call(1); |
| 360 testing::runPendingTasks(); | 332 testing::runPendingTasks(); |
| 361 checkpoint.Call(2); | 333 checkpoint.Call(2); |
| 362 client->didReceiveResponse(0, ResourceResponse(), std::move(src)); | 334 client->didReceiveResponse(0, ResourceResponse(), std::move(src)); |
| 363 HandleReaderRunner<HandleReader> runner(std::move(handle)); | 335 HandleReaderRunner<HandleReader> runner(std::move(handle)); |
| 364 std::unique_ptr<HandleReadResult> r = runner.wait(); | 336 std::unique_ptr<HandleReadResult> r = runner.wait(); |
| 365 EXPECT_EQ(kUnexpectedError, r->result()); | 337 EXPECT_EQ(kUnexpectedError, r->result()); |
| 366 } | 338 } |
| 367 | 339 |
| 368 TEST_F(FetchBlobDataConsumerHandleTest, DrainAsBlobDataHandle) | 340 TEST_F(FetchBlobDataConsumerHandleTest, DrainAsBlobDataHandle) |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 std::unique_ptr<FetchDataConsumerHandle::Reader> reader = handle->obtainFetc
hDataReader(nullptr); | 412 std::unique_ptr<FetchDataConsumerHandle::Reader> reader = handle->obtainFetc
hDataReader(nullptr); |
| 441 | 413 |
| 442 const void* buffer; | 414 const void* buffer; |
| 443 size_t available; | 415 size_t available; |
| 444 EXPECT_EQ(kShouldWait, reader->beginRead(&buffer, kNone, &available)); | 416 EXPECT_EQ(kShouldWait, reader->beginRead(&buffer, kNone, &available)); |
| 445 EXPECT_FALSE(reader->drainAsBlobDataHandle()); | 417 EXPECT_FALSE(reader->drainAsBlobDataHandle()); |
| 446 } | 418 } |
| 447 | 419 |
| 448 } // namespace | 420 } // namespace |
| 449 } // namespace blink | 421 } // namespace blink |
| OLD | NEW |