Upload upstream chromium 108.0.5359.1
[platform/framework/web/chromium-efl.git] / media / filters / memory_data_source_unittest.cc
index b95118c..af1908c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
+// Copyright 2016 The Chromium Authors
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -7,7 +7,7 @@
 #include <memory>
 
 #include "base/bind.h"
-#include "base/macros.h"
+#include "base/callback.h"
 #include "base/rand_util.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -18,11 +18,15 @@ class MemoryDataSourceTest : public ::testing::Test {
  public:
   MemoryDataSourceTest() = default;
 
+  MemoryDataSourceTest(const MemoryDataSourceTest&) = delete;
+  MemoryDataSourceTest& operator=(const MemoryDataSourceTest&) = delete;
+
  protected:
   void Initialize(size_t size) {
     data_.assign(size, 0);
     base::RandBytes(data_.data(), size);
-    memory_data_source_.reset(new MemoryDataSource(data_.data(), size));
+    memory_data_source_ =
+        std::make_unique<MemoryDataSource>(data_.data(), size);
     EXPECT_EQ(size, GetSize());
   }
 
@@ -35,7 +39,7 @@ class MemoryDataSourceTest : public ::testing::Test {
     EXPECT_CALL(*this, ReadCB(expected_read_size));
     memory_data_source_->Read(
         position, size, data.data(),
-        base::Bind(&MemoryDataSourceTest::ReadCB, base::Unretained(this)));
+        base::BindOnce(&MemoryDataSourceTest::ReadCB, base::Unretained(this)));
 
     if (expected_read_size != DataSource::kReadError) {
       EXPECT_EQ(
@@ -57,8 +61,6 @@ class MemoryDataSourceTest : public ::testing::Test {
  private:
   std::vector<uint8_t> data_;
   std::unique_ptr<MemoryDataSource> memory_data_source_;
-
-  DISALLOW_COPY_AND_ASSIGN(MemoryDataSourceTest);
 };
 
 TEST_F(MemoryDataSourceTest, EmptySource) {