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

Side by Side Diff: media/formats/mpeg/adts_stream_parser_unittest.cc

Issue 2253943004: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "media/formats/mpeg/adts_stream_parser.h" 5 #include "media/formats/mpeg/adts_stream_parser.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "media/formats/common/stream_parser_test_base.h" 10 #include "media/formats/common/stream_parser_test_base.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace media { 13 namespace media {
14 14
15 class ADTSStreamParserTest : public StreamParserTestBase, public testing::Test { 15 class ADTSStreamParserTest : public StreamParserTestBase, public testing::Test {
16 public: 16 public:
17 ADTSStreamParserTest() 17 ADTSStreamParserTest()
18 : StreamParserTestBase(base::WrapUnique(new ADTSStreamParser())) {} 18 : StreamParserTestBase(base::MakeUnique<ADTSStreamParser>()) {}
19 }; 19 };
20 20
21 // Test parsing with small prime sized chunks to smoke out "power of 21 // Test parsing with small prime sized chunks to smoke out "power of
22 // 2" field size assumptions. 22 // 2" field size assumptions.
23 TEST_F(ADTSStreamParserTest, UnalignedAppend) { 23 TEST_F(ADTSStreamParserTest, UnalignedAppend) {
24 const std::string expected = 24 const std::string expected =
25 "NewSegment" 25 "NewSegment"
26 "{ 0K }" 26 "{ 0K }"
27 "{ 0K }" 27 "{ 0K }"
28 "{ 0K }" 28 "{ 0K }"
(...skipping 23 matching lines...) Expand all
52 "{ 0K 23K 46K 69K 92K }" 52 "{ 0K 23K 46K 69K 92K }"
53 "{ 0K 23K 46K 69K 92K }" 53 "{ 0K 23K 46K 69K 92K }"
54 "EndOfSegment" 54 "EndOfSegment"
55 "NewSegment" 55 "NewSegment"
56 "{ 0K }" 56 "{ 0K }"
57 "EndOfSegment"; 57 "EndOfSegment";
58 EXPECT_EQ(expected, ParseFile("sfx.adts", 512)); 58 EXPECT_EQ(expected, ParseFile("sfx.adts", 512));
59 } 59 }
60 60
61 } // namespace media 61 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/gpu_video_decoder.cc ('k') | media/formats/mpeg/mpeg1_audio_stream_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698