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

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

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Add missing ScopedAsyncTaskScheduler instance for the new unit tests; required by a recent change t… Created 3 years, 10 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 } 126 }
127 127
128 void ExpectRegisterAndStartMessage(const std::string& expected_uuid, 128 void ExpectRegisterAndStartMessage(const std::string& expected_uuid,
129 const std::string& expected_content_type, 129 const std::string& expected_content_type,
130 std::vector<DataElement>* descriptions) { 130 std::vector<DataElement>* descriptions) {
131 const IPC::Message* register_message = 131 const IPC::Message* register_message =
132 sink_.GetUniqueMessageMatching(BlobStorageMsg_RegisterBlob::ID); 132 sink_.GetUniqueMessageMatching(BlobStorageMsg_RegisterBlob::ID);
133 ASSERT_TRUE(register_message); 133 ASSERT_TRUE(register_message);
134 std::tuple<std::string, std::string, std::string, std::vector<DataElement>> 134 std::tuple<std::string, std::string, std::string, std::vector<DataElement>>
135 register_contents; 135 register_contents;
136 BlobStorageMsg_RegisterBlob::Read(register_message, &register_contents); 136 BlobStorageMsg_RegisterBlob::ReadSendParam(register_message,
137 &register_contents);
137 EXPECT_EQ(expected_uuid, std::get<0>(register_contents)); 138 EXPECT_EQ(expected_uuid, std::get<0>(register_contents));
138 EXPECT_EQ(expected_content_type, std::get<1>(register_contents)); 139 EXPECT_EQ(expected_content_type, std::get<1>(register_contents));
139 if (descriptions) 140 if (descriptions)
140 *descriptions = std::get<3>(register_contents); 141 *descriptions = std::get<3>(register_contents);
141 // We don't have dispositions from the renderer. 142 // We don't have dispositions from the renderer.
142 EXPECT_TRUE(std::get<2>(register_contents).empty()); 143 EXPECT_TRUE(std::get<2>(register_contents).empty());
143 sink_.ClearMessages(); 144 sink_.ClearMessages();
144 } 145 }
145 146
146 void ExpectMemoryResponses( 147 void ExpectMemoryResponses(
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 EXPECT_FALSE(main_thread_runner_->HasPendingTask()); 470 EXPECT_FALSE(main_thread_runner_->HasPendingTask());
470 471
471 // Finish the second one. 472 // Finish the second one.
472 holder->OnBlobFinalStatus(kBlob2UUID, BlobStatus::DONE); 473 holder->OnBlobFinalStatus(kBlob2UUID, BlobStatus::DONE);
473 EXPECT_FALSE(holder->IsTransporting(kBlob2UUID)); 474 EXPECT_FALSE(holder->IsTransporting(kBlob2UUID));
474 EXPECT_TRUE(main_thread_runner_->HasPendingTask()); 475 EXPECT_TRUE(main_thread_runner_->HasPendingTask());
475 main_thread_runner_->ClearPendingTasks(); 476 main_thread_runner_->ClearPendingTasks();
476 } 477 }
477 478
478 } // namespace content 479 } // namespace content
OLDNEW
« no previous file with comments | « content/child/blob_storage/blob_transport_controller.cc ('k') | content/child/blob_storage/webblobregistry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698