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

Unified Diff: media/formats/webm/webm_parser_unittest.cc

Issue 1874413003: Convert media/formats to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: media/formats/webm/webm_parser_unittest.cc
diff --git a/media/formats/webm/webm_parser_unittest.cc b/media/formats/webm/webm_parser_unittest.cc
index fad4526ee8046f53bc2166f55446d2dd81fa3fee..6440aee7964346e965dcc3a18b9222154c4153f9 100644
--- a/media/formats/webm/webm_parser_unittest.cc
+++ b/media/formats/webm/webm_parser_unittest.cc
@@ -2,13 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "media/formats/webm/webm_parser.h"
+
#include <stddef.h>
#include <stdint.h>
+#include <memory>
+
#include "base/macros.h"
#include "media/formats/webm/cluster_builder.h"
#include "media/formats/webm/webm_constants.h"
-#include "media/formats/webm/webm_parser.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -40,7 +43,7 @@ class WebMParserTest : public testing::Test {
StrictMock<MockWebMParserClient> client_;
};
-static scoped_ptr<Cluster> CreateCluster(int block_count) {
+static std::unique_ptr<Cluster> CreateCluster(int block_count) {
ClusterBuilder cb;
cb.SetClusterTimecode(0);
@@ -221,7 +224,7 @@ TEST_F(WebMParserTest, VoidAndCRC32InList) {
TEST_F(WebMParserTest, ParseListElementWithSingleCall) {
- scoped_ptr<Cluster> cluster(CreateCluster(kBlockCount));
+ std::unique_ptr<Cluster> cluster(CreateCluster(kBlockCount));
CreateClusterExpectations(kBlockCount, true, &client_);
WebMListParser parser(kWebMIdCluster, &client_);
@@ -230,7 +233,7 @@ TEST_F(WebMParserTest, ParseListElementWithSingleCall) {
}
TEST_F(WebMParserTest, ParseListElementWithMultipleCalls) {
- scoped_ptr<Cluster> cluster(CreateCluster(kBlockCount));
+ std::unique_ptr<Cluster> cluster(CreateCluster(kBlockCount));
CreateClusterExpectations(kBlockCount, true, &client_);
const uint8_t* data = cluster->data();
@@ -264,7 +267,7 @@ TEST_F(WebMParserTest, ParseListElementWithMultipleCalls) {
TEST_F(WebMParserTest, Reset) {
InSequence s;
- scoped_ptr<Cluster> cluster(CreateCluster(kBlockCount));
+ std::unique_ptr<Cluster> cluster(CreateCluster(kBlockCount));
// First expect all but the last block.
CreateClusterExpectations(kBlockCount - 1, false, &client_);

Powered by Google App Engine
This is Rietveld 408576698