Skip to content

Commit

Permalink
[nplb] Enable SbMediaSetAudioWriteDurationTests
Browse files Browse the repository at this point in the history
b/268744146
  • Loading branch information
jasonzhangxx committed Jun 14, 2023
1 parent ea69d45 commit 2befa55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions starboard/nplb/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ target(gtest_target_type, "nplb") {
"media_buffer_test.cc",
"media_can_play_mime_and_key_system_test.cc",
"media_configuration_test.cc",
"media_set_audio_write_duration_test.cc",
"memory_allocate_aligned_test.cc",
"memory_allocate_test.cc",
"memory_deallocate_aligned_test.cc",
Expand Down
8 changes: 4 additions & 4 deletions starboard/nplb/media_set_audio_write_duration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#include "starboard/testing/fake_graphics_context_provider.h"
#include "testing/gtest/include/gtest/gtest.h"

#if SB_API_VERSION < 15

namespace starboard {
namespace nplb {
namespace {
Expand Down Expand Up @@ -183,7 +181,9 @@ TEST_P(SbMediaSetAudioWriteDurationTest, WriteLimitedInput) {
ASSERT_NE(dmp_reader_.audio_codec(), kSbMediaAudioCodecNone);
ASSERT_GT(dmp_reader_.number_of_audio_buffers(), 0);

#if SB_API_VERSION < 15
SbMediaSetAudioWriteDuration(kDuration);
#endif // SB_API_VERSION < 15

SbPlayer player = CreatePlayer();
WaitForPlayerState(kSbPlayerStateInitialized);
Expand Down Expand Up @@ -224,7 +224,9 @@ TEST_P(SbMediaSetAudioWriteDurationTest, WriteContinuedLimitedInput) {
ASSERT_NE(dmp_reader_.audio_codec(), kSbMediaAudioCodecNone);
ASSERT_GT(dmp_reader_.number_of_audio_buffers(), 0);

#if SB_API_VERSION < 15
SbMediaSetAudioWriteDuration(kDuration);
#endif // SB_API_VERSION < 15

// This directly impacts the runtime of the test.
total_duration_ = 15 * kSbTimeSecond;
Expand Down Expand Up @@ -297,5 +299,3 @@ INSTANTIATE_TEST_CASE_P(SbMediaSetAudioWriteDurationTests,
} // namespace
} // namespace nplb
} // namespace starboard

#endif // SB_API_VERSION < 15

0 comments on commit 2befa55

Please sign in to comment.