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

Side by Side Diff: media/formats/mpeg/adts_stream_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 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"
6
7 #include <memory>
8
9 #include "base/memory/ptr_util.h"
5 #include "media/formats/common/stream_parser_test_base.h" 10 #include "media/formats/common/stream_parser_test_base.h"
6 #include "media/formats/mpeg/adts_stream_parser.h"
7 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
8 12
9 namespace media { 13 namespace media {
10 14
11 class ADTSStreamParserTest : public StreamParserTestBase, public testing::Test { 15 class ADTSStreamParserTest : public StreamParserTestBase, public testing::Test {
12 public: 16 public:
13 ADTSStreamParserTest() 17 ADTSStreamParserTest()
14 : StreamParserTestBase(make_scoped_ptr(new ADTSStreamParser())) {} 18 : StreamParserTestBase(base::WrapUnique(new ADTSStreamParser())) {}
15 }; 19 };
16 20
17 // 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
18 // 2" field size assumptions. 22 // 2" field size assumptions.
19 TEST_F(ADTSStreamParserTest, UnalignedAppend) { 23 TEST_F(ADTSStreamParserTest, UnalignedAppend) {
20 const std::string expected = 24 const std::string expected =
21 "NewSegment" 25 "NewSegment"
22 "{ 0K }" 26 "{ 0K }"
23 "{ 0K }" 27 "{ 0K }"
24 "{ 0K }" 28 "{ 0K }"
(...skipping 23 matching lines...) Expand all
48 "{ 0K 23K 46K 69K 92K }" 52 "{ 0K 23K 46K 69K 92K }"
49 "{ 0K 23K 46K 69K 92K }" 53 "{ 0K 23K 46K 69K 92K }"
50 "EndOfSegment" 54 "EndOfSegment"
51 "NewSegment" 55 "NewSegment"
52 "{ 0K }" 56 "{ 0K }"
53 "EndOfSegment"; 57 "EndOfSegment";
54 EXPECT_EQ(expected, ParseFile("sfx.adts", 512)); 58 EXPECT_EQ(expected, ParseFile("sfx.adts", 512));
55 } 59 }
56 60
57 } // namespace media 61 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698