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

Side by Side Diff: media/filters/adaptive_demuxer_unittest.cc

Issue 7601002: Revert r95841 due to failing media_unittests on linux_shared bot. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « media/filters/adaptive_demuxer.h ('k') | media/filters/audio_file_reader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/string_number_conversions.h" 5 #include "base/string_number_conversions.h"
6 #include "media/filters/adaptive_demuxer.h" 6 #include "media/filters/adaptive_demuxer.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace media { 9 namespace media {
10 10
11 bool ParseAdaptiveUrl(
12 const std::string& url, int* audio_index, int* video_index,
13 std::vector<std::string>* urls);
14
11 TEST(ParseAdaptiveUrlTest, BackwardsCompatible) { 15 TEST(ParseAdaptiveUrlTest, BackwardsCompatible) {
12 std::string manifest = "http://youtube.com/video.webm"; 16 std::string manifest = "http://youtube.com/video.webm";
13 int audio_index; 17 int audio_index;
14 int video_index; 18 int video_index;
15 std::vector<std::string> urls; 19 std::vector<std::string> urls;
16 ASSERT_TRUE(ParseAdaptiveUrl(manifest, &audio_index, &video_index, &urls)); 20 ASSERT_TRUE(ParseAdaptiveUrl(manifest, &audio_index, &video_index, &urls));
17 EXPECT_EQ(audio_index, 0); 21 EXPECT_EQ(audio_index, 0);
18 EXPECT_EQ(video_index, 0); 22 EXPECT_EQ(video_index, 0);
19 ASSERT_EQ(urls.size(), 1u); 23 ASSERT_EQ(urls.size(), 1u);
20 EXPECT_EQ(urls[0], manifest); 24 EXPECT_EQ(urls[0], manifest);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 EXPECT_FALSE(ParseAdaptiveUrl( 65 EXPECT_FALSE(ParseAdaptiveUrl(
62 "x-adaptive:0:file.webm", &audio_index, &video_index, &urls)); 66 "x-adaptive:0:file.webm", &audio_index, &video_index, &urls));
63 EXPECT_FALSE(ParseAdaptiveUrl( 67 EXPECT_FALSE(ParseAdaptiveUrl(
64 "x-adaptive::0:file.webm", &audio_index, &video_index, &urls)); 68 "x-adaptive::0:file.webm", &audio_index, &video_index, &urls));
65 // Invalid index for URL list. 69 // Invalid index for URL list.
66 EXPECT_FALSE(ParseAdaptiveUrl( 70 EXPECT_FALSE(ParseAdaptiveUrl(
67 "x-adaptive:1:0:file.webm", &audio_index, &video_index, &urls)); 71 "x-adaptive:1:0:file.webm", &audio_index, &video_index, &urls));
68 } 72 }
69 73
70 } // namespace media 74 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/adaptive_demuxer.h ('k') | media/filters/audio_file_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698