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

Side by Side Diff: media/test/pipeline_integration_test.cc

Issue 2269313002: Fix DCHECK when track status changes in non-playing state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed one more DCHECK + added a unit test Created 4 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 1014
1015 // Restart playback from 500ms position. 1015 // Restart playback from 500ms position.
1016 ASSERT_TRUE(Seek(k500ms)); 1016 ASSERT_TRUE(Seek(k500ms));
1017 Play(); 1017 Play();
1018 ASSERT_TRUE(WaitUntilOnEnded()); 1018 ASSERT_TRUE(WaitUntilOnEnded());
1019 1019
1020 // Verify that video has been rendered after being enabled. 1020 // Verify that video has been rendered after being enabled.
1021 EXPECT_HASH_EQ("fd59357dfd9c144ab4fb8181b2de32c3", GetVideoHash()); 1021 EXPECT_HASH_EQ("fd59357dfd9c144ab4fb8181b2de32c3", GetVideoHash());
1022 } 1022 }
1023 1023
1024 TEST_F(PipelineIntegrationTest, TrackStatusChangesAfterPipelineEnded) {
1025 ASSERT_EQ(PIPELINE_OK, Start("bear-320x240.webm", kHashed));
1026 Play();
1027 ASSERT_TRUE(WaitUntilOnEnded());
chcunningham 2016/08/24 22:16:53 Is the expectation that waiting until ended will c
servolk 2016/08/24 22:46:32 No, we don't need suspend to happen. After pipelin
chcunningham 2016/08/25 20:45:54 I don't think this transition to stopped is happen
1028 std::vector<MediaTrack::Id> track_ids;
1029 // Disable audio track.
1030 pipeline_->OnEnabledAudioTracksChanged(track_ids);
1031 // Re-enable audio track.
1032 track_ids.push_back("2");
1033 pipeline_->OnEnabledAudioTracksChanged(track_ids);
1034 // Disable video track.
1035 track_ids.clear();
1036 pipeline_->OnSelectedVideoTrackChanged(track_ids);
1037 // Re-enable video track.
1038 track_ids.push_back("1");
1039 pipeline_->OnSelectedVideoTrackChanged(track_ids);
1040 }
1041
1024 TEST_F(PipelineIntegrationTest, 1042 TEST_F(PipelineIntegrationTest,
1025 MAYBE_CLOCKLESS(BasicPlaybackOpusOggTrimmingHashed)) { 1043 MAYBE_CLOCKLESS(BasicPlaybackOpusOggTrimmingHashed)) {
1026 ASSERT_EQ(PIPELINE_OK, 1044 ASSERT_EQ(PIPELINE_OK,
1027 Start("opus-trimming-test.webm", kHashed | kClockless)); 1045 Start("opus-trimming-test.webm", kHashed | kClockless));
1028 1046
1029 Play(); 1047 Play();
1030 1048
1031 ASSERT_TRUE(WaitUntilOnEnded()); 1049 ASSERT_TRUE(WaitUntilOnEnded());
1032 EXPECT_HASH_EQ(kOpusEndTrimmingHash_1, GetAudioHash()); 1050 EXPECT_HASH_EQ(kOpusEndTrimmingHash_1, GetAudioHash());
1033 1051
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
2398 2416
2399 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { 2417 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) {
2400 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); 2418 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm"));
2401 Play(); 2419 Play();
2402 ASSERT_TRUE(WaitUntilOnEnded()); 2420 ASSERT_TRUE(WaitUntilOnEnded());
2403 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), 2421 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000),
2404 demuxer_->GetStartTime()); 2422 demuxer_->GetStartTime());
2405 } 2423 }
2406 2424
2407 } // namespace media 2425 } // namespace media
OLDNEW
« media/renderers/renderer_impl.cc ('K') | « media/renderers/renderer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698