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

Side by Side Diff: third_party/WebKit/Source/platform/blob/BlobDataTest.cpp

Issue 2967013002: Be explicit about namespace testing to not mix it with blink::testing (Closed)
Patch Set: Dropped mojo parts that need another review. Created 3 years, 5 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 "platform/blob/BlobData.h" 5 #include "platform/blob/BlobData.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include "base/test/scoped_task_environment.h" 9 #include "base/test/scoped_task_environment.h"
10 #include "mojo/public/cpp/bindings/binding_set.h" 10 #include "mojo/public/cpp/bindings/binding_set.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 uint64_t offset, 183 uint64_t offset,
184 uint64_t length) { 184 uint64_t length) {
185 return ExpectedElement{ 185 return ExpectedElement{
186 DataElement::NewBlob(DataElementBlob::New(nullptr, offset, length)), 186 DataElement::NewBlob(DataElementBlob::New(nullptr, offset, length)),
187 uuid}; 187 uuid};
188 } 188 }
189 }; 189 };
190 190
191 } // namespace 191 } // namespace
192 192
193 class BlobDataHandleTest : public testing::Test { 193 class BlobDataHandleTest : public ::testing::Test {
194 public: 194 public:
195 BlobDataHandleTest() 195 BlobDataHandleTest()
196 : enable_mojo_blobs_(true), testing_platform_(&mock_blob_registry_) {} 196 : enable_mojo_blobs_(true), testing_platform_(&mock_blob_registry_) {}
197 197
198 void SetUp() override { 198 void SetUp() override {
199 small_test_data_.resize(1024); 199 small_test_data_.resize(1024);
200 medium_test_data_.resize(1024 * 32); 200 medium_test_data_.resize(1024 * 32);
201 large_test_data_.resize(1024 * 512); 201 large_test_data_.resize(1024 * 512);
202 for (size_t i = 0; i < small_test_data_.size(); ++i) 202 for (size_t i = 0; i < small_test_data_.size(); ++i)
203 small_test_data_[i] = i; 203 small_test_data_[i] = i;
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 expected_elements.push_back( 546 expected_elements.push_back(
547 ExpectedElement::LargeBytes(std::move(merged_data))); 547 ExpectedElement::LargeBytes(std::move(merged_data)));
548 expected_elements.push_back(ExpectedElement::Blob(test_blob_uuid_, 0, 10)); 548 expected_elements.push_back(ExpectedElement::Blob(test_blob_uuid_, 0, 10));
549 expected_elements.push_back( 549 expected_elements.push_back(
550 ExpectedElement::EmbeddedBytes(medium_test_data_)); 550 ExpectedElement::EmbeddedBytes(medium_test_data_));
551 551
552 TestCreateBlob(std::move(data), std::move(expected_elements)); 552 TestCreateBlob(std::move(data), std::move(expected_elements));
553 } 553 }
554 554
555 } // namespace blink 555 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698