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

Side by Side Diff: content/child/blob_storage/blob_transport_controller_unittest.cc

Issue 2823103003: Introduce TaskRunner::RunsTasksInCurrentSequence() (Closed)
Patch Set: fixed build error and commments Created 3 years, 8 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 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 "content/child/blob_storage/blob_transport_controller.h" 5 #include "content/child/blob_storage/blob_transport_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <tuple> 9 #include <tuple>
10 10
(...skipping 27 matching lines...) Expand all
38 using storage::BlobItemBytesRequest; 38 using storage::BlobItemBytesRequest;
39 using storage::BlobItemBytesResponse; 39 using storage::BlobItemBytesResponse;
40 using storage::BlobStatus; 40 using storage::BlobStatus;
41 using storage::DataElement; 41 using storage::DataElement;
42 42
43 namespace content { 43 namespace content {
44 namespace { 44 namespace {
45 45
46 class OtherThreadTestSimpleTaskRunner : public base::TestSimpleTaskRunner { 46 class OtherThreadTestSimpleTaskRunner : public base::TestSimpleTaskRunner {
47 public: 47 public:
48 bool RunsTasksOnCurrentThread() const override { return false; } 48 bool RunsTasksInCurrentSequence() const override { return false; }
49 49
50 protected: 50 protected:
51 ~OtherThreadTestSimpleTaskRunner() override {} 51 ~OtherThreadTestSimpleTaskRunner() override {}
52 }; 52 };
53 53
54 class BlobTransportControllerTestSender : public ThreadSafeSender { 54 class BlobTransportControllerTestSender : public ThreadSafeSender {
55 public: 55 public:
56 explicit BlobTransportControllerTestSender(IPC::TestSink* ipc_sink) 56 explicit BlobTransportControllerTestSender(IPC::TestSink* ipc_sink)
57 : ThreadSafeSender(nullptr, nullptr), ipc_sink_(ipc_sink) {} 57 : ThreadSafeSender(nullptr, nullptr), ipc_sink_(ipc_sink) {}
58 58
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 EXPECT_FALSE(main_thread_runner_->HasPendingTask()); 470 EXPECT_FALSE(main_thread_runner_->HasPendingTask());
471 471
472 // Finish the second one. 472 // Finish the second one.
473 holder->OnBlobFinalStatus(kBlob2UUID, BlobStatus::DONE); 473 holder->OnBlobFinalStatus(kBlob2UUID, BlobStatus::DONE);
474 EXPECT_FALSE(holder->IsTransporting(kBlob2UUID)); 474 EXPECT_FALSE(holder->IsTransporting(kBlob2UUID));
475 EXPECT_TRUE(main_thread_runner_->HasPendingTask()); 475 EXPECT_TRUE(main_thread_runner_->HasPendingTask());
476 main_thread_runner_->ClearPendingTasks(); 476 main_thread_runner_->ClearPendingTasks();
477 } 477 }
478 478
479 } // namespace content 479 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698