Updated usage test to expect v16 duration values.
[ Merge of http://go/wvgerrit/174431 ] It is possible that the initial license duration was limited due to the finit rental duration; however, if the license has a soft rental duration, it will be considered unlimited after playback has begun. The *.UsageTest* have been updated to ignore cases where initial license durations are finit, but later report as unlimited. Bug: 275651559 Test: cdm_extended_duration_test Change-Id: I689163b1066b2bc9f9345e2279e9373010f844cc
This commit is contained in:
@@ -1316,7 +1316,11 @@ TEST_P(WvCdmStreamingNoPstTest, UsageTest) {
|
||||
|
||||
if (initial_license_duration_remaining == kUnlimitedDurationValue) {
|
||||
EXPECT_EQ(license_duration_remaining, kUnlimitedDurationValue);
|
||||
} else {
|
||||
} else if (license_duration_remaining != kUnlimitedDurationValue) {
|
||||
// Possible that the initial license duration was limited due to
|
||||
// the finit rental duration; however, if the license has a soft
|
||||
// rental duration, it will be considered unlimited after playback
|
||||
// has begun.
|
||||
EXPECT_NEAR(initial_license_duration_remaining - license_duration_remaining,
|
||||
expected_seconds_since_license_received, kClockTolerance)
|
||||
<< "initial_license_duration_remaining = "
|
||||
@@ -1343,9 +1347,7 @@ INSTANTIATE_TEST_CASE_P(Cdm, WvCdmStreamingNoPstTest,
|
||||
class WvCdmStreamingPstTest : public WvCdmExtendedDurationTest,
|
||||
public ::testing::WithParamInterface<size_t> {};
|
||||
|
||||
// TODO(b275651559): Re-enable test once the issue with "license remaining
|
||||
// duration" is addressed.
|
||||
TEST_P(WvCdmStreamingPstTest, DISABLED_UsageTest) {
|
||||
TEST_P(WvCdmStreamingPstTest, UsageTest) {
|
||||
Unprovision();
|
||||
Provision();
|
||||
|
||||
@@ -1400,7 +1402,11 @@ TEST_P(WvCdmStreamingPstTest, DISABLED_UsageTest) {
|
||||
|
||||
if (initial_license_duration_remaining == kUnlimitedDurationValue) {
|
||||
EXPECT_EQ(license_duration_remaining, kUnlimitedDurationValue);
|
||||
} else {
|
||||
} else if (license_duration_remaining != kUnlimitedDurationValue) {
|
||||
// Possible that the initial license duration was limited due to
|
||||
// the finit rental duration; however, if the license has a soft
|
||||
// rental duration, it will be considered unlimited after playback
|
||||
// has begun.
|
||||
EXPECT_NEAR(initial_license_duration_remaining - license_duration_remaining,
|
||||
expected_seconds_since_license_received, kClockTolerance)
|
||||
<< "initial_license_duration_remaining = "
|
||||
@@ -1427,9 +1433,7 @@ class WvCdmStreamingUsageReportTest
|
||||
: public WvCdmExtendedDurationTest,
|
||||
public ::testing::WithParamInterface<size_t> {};
|
||||
|
||||
// TODO(b275651559): Re-enable test once the issue with "license remaining
|
||||
// duration" is addressed.
|
||||
TEST_P(WvCdmStreamingUsageReportTest, DISABLED_UsageTest) {
|
||||
TEST_P(WvCdmStreamingUsageReportTest, UsageTest) {
|
||||
Unprovision();
|
||||
Provision();
|
||||
|
||||
@@ -1488,7 +1492,11 @@ TEST_P(WvCdmStreamingUsageReportTest, DISABLED_UsageTest) {
|
||||
// change over time.
|
||||
if (initial_license_duration_remaining == kUnlimitedDurationValue) {
|
||||
EXPECT_EQ(license_duration_remaining, kUnlimitedDurationValue);
|
||||
} else {
|
||||
} else if (license_duration_remaining != kUnlimitedDurationValue) {
|
||||
// Possible that the initial license duration was limited due to
|
||||
// the finit rental duration; however, if the license has a soft
|
||||
// rental duration, it will be considered unlimited after playback
|
||||
// has begun.
|
||||
EXPECT_NEAR(initial_license_duration_remaining - license_duration_remaining,
|
||||
expected_seconds_since_license_received, kClockTolerance)
|
||||
<< "initial_license_duration_remaining = "
|
||||
@@ -1660,7 +1668,11 @@ TEST_P(WvCdmOfflineUsageReportTest, UsageTest) {
|
||||
|
||||
if (initial_license_duration_remaining == kUnlimitedDurationValue) {
|
||||
EXPECT_EQ(license_duration_remaining, kUnlimitedDurationValue);
|
||||
} else {
|
||||
} else if (license_duration_remaining != kUnlimitedDurationValue) {
|
||||
// Possible that the initial license duration was limited due to
|
||||
// the finit rental duration; however, if the license has a soft
|
||||
// rental duration, it will be considered unlimited after playback
|
||||
// has begun.
|
||||
EXPECT_NEAR(initial_license_duration_remaining - license_duration_remaining,
|
||||
expected_seconds_since_license_received, kClockTolerance)
|
||||
<< "initial_license_duration_remaining = "
|
||||
|
||||
Reference in New Issue
Block a user