Commit Graph

18 Commits

Author SHA1 Message Date
Jacob Trimble 26bacb1489 Disallow unknown properties (3/5).
This is part of adding a new conformance rule to add additional type
safety.  This will disallow using properties of unknown types or using
unknown properties.

The first parts will be fixing errors caused by the new rule.  These
are backwards compatible, so can be applied before the rule is enabled.
Once all the errors and bugs are fixed, the rule will be enabled.

Change-Id: Ic37437a1ad2305bc50a814cdcc562e74703222ac
2017-07-05 17:47:03 +00:00
Joey Parrish 892d107433 Reorder, clean up, extend times of offline tests
This changes the order of the things tested in the offline tests,
cleans them up a little, adds comments, and extends the playback
time by 5 additional seconds to deflake the tests.

Closes #903

Change-Id: I9c0656882cf31e3f61c67946b7867d3ef25ba953
2017-06-22 20:14:21 +00:00
Joey Parrish 8b54c7b758 Define, document and rename new option for offline
The new isPersistentLicense option was not documented in #878.
This adds docs and renames it to usePersistentLicense.

Closes #873

Change-Id: I59ed32c98660ad7c155392a1708eab98f63131c3
2017-06-21 14:56:05 -07:00
Graham Scragg 59fe4e5d40 Support for offline data with a temporary license (#878)
Based on app configuration, we could store protected content offline
without a persistent license.  The offline content would then require
a network connection, but only briefly for licensing.  This makes
sense in a lot of commuter or airplane WiFi scenarios.

Closes #873
2017-06-21 14:44:02 -07:00
Jacob Trimble 575f2ad109 Add an indicator for critical errors.
This adds a severity field to Error objects.  This can be used to
detect whether an error is recoverable.  All the same errors are still
reported so the field can be ignored.

There are two possible values:
* RECOVERABLE means that the Player will try to recover from the error
* CRITICAL means the Player will be unable to continue and must call
  load() again

Closes #564

Change-Id: Ie2c5468340c13e7a288b99690ab65b7ecc0a6b29
2017-04-04 23:57:59 +00:00
Jacob Trimble b4d0fa4901 Expose license expiration times through Player.
This adds a method on Player to get the license expiration times for
the current EME sessions.  This also adds the expiration times to the
stored content structure for offline content.  This will update the
stored expiration while playing content (e.g. license duration changes
when playback starts).

Closes #727

Change-Id: I18770a79413423695bbb2ed5f31f6b19038a33d2
2017-04-03 18:25:43 +00:00
Joey Parrish 0c4f6258b3 Treat DRM license tests separately
These tests will no longer be lumped into the same group as "external"
asset tests.  This will allow us more control over test coverage in
different scenarios in our lab.

Change-Id: I0b0f2ae5ed6e74fdf87ad4ecf94ce41d94763537
2017-03-20 23:38:03 +00:00
Jacob Trimble 7dbc6c4b12 Workaround IndexedDB race on IE/Edge.
This implements the workaround for a race in IndexedDB on IE/Edge.
If we don't get an 'upgradeneeded' event when we expect it, we will
close the connection and retry.

b/35993864

Change-Id: I78d1c18e4798c098167a1a6a184623780002a34f
2017-03-20 21:32:32 +00:00
Joey Parrish 2cbb13fd28 Quarantine failing offline tests on IE/Edge
Change-Id: I8cb77b3e7e1b3b5ddd35e944494c03cd14ff6249
2017-03-06 09:45:23 -08:00
Joey Parrish 84fb9d422e Fix buffering watchdog to match StreamingEngine
StreamingEngine continues to buffer until the amount buffered is
greater than or equal to the goal.  Playhead's watchdog checked that
the amount buffered was strictly greater than the goal, leading to a
race in which we could get stuck buffering forever.

The race was between buffering and the first watchdog timer callback.

If data gets buffered before the first callback fires, the watchdog
will see that bufferedAhead is greater than threshold, and it will
not enter a buffering state.

If the callback fires before anything is buffered, it sees
bufferedAhead == 0 and enters a buffering state.  If the config is
such that bufferingGoal and rebufferingGoal are the same, then
Playhead is stuck in buffering.  StreamingEngine won't buffer more
until something plays, and Playhead won't leave the buffering state
until something more is buffered.

This turned out to be the root cause of failures in one of our
quarantined tests.  While debugging this test, I noticed that
video.playbackRate was 0, which we set while buffering.  This led me
to investigate buffering logic in Playhead, where I noticed that
bufferedAhead was exactly rebufferingGoal in the instances where the
test failed.

In 100 test runs, the test failed 9 times.  No other tests had to be
run to trigger the failure, so this one test was run in a for loop.

Once I understood the cause of the race, I found that I could trigger
the failure in 100 out of 100 tests by changing startWatchdogTimer_()
to onWatchdogTimer_() in the Playhead constructor.  This ensures that
the timer callback fires synchronously, before anything can be
buffered.

With the underlying bug fixed, the test has now been removed from
quarantine.

Change-Id: Ief5c11b2211045a32dc0a9f711b17a4ec1bf55af
2016-11-30 00:34:37 +00:00
Joey Parrish bdd147229a Quarantine tests that are not always passing
This hides 6 tests behind the --quarantined flag.  Without this flag,
these tests will be skipped.  This allows us to get consistent results
from the build bot while we work to fix these tests.

Change-Id: I6cf3921228da1831f71a89cd5802ea48c66752bd
2016-11-23 10:16:30 -08:00
Joey Parrish 298dc431c8 Mark tests external for using license server
Tests that use a remote license server should be behind the --external
flag.  This introduces a new shim that makes it easy to mark tests as
external.  This also lays the groundwork to hide tests behind other
flags.

Change-Id: I035de24e02035e732c515522378247c692e74b7c
2016-11-21 16:40:06 -08:00
Joey Parrish d0908fe743 Raise the async test timeout to 120s
All tests now have the same timeout value.  This should simplify the
process of addressing timeouts on Safari.

Change-Id: I3b455bd639758007ec8b2b86ef236c56e919c15a
2016-08-11 10:54:49 -07:00
Andy Hochhaus b7fc078139 Update to compiler v20160713 2016-07-26 10:16:57 -07:00
Andy Hochhaus 2381e27406 Add JSDoc to functions with non-trivial return values 2016-07-23 23:35:51 -07:00
Jacob Trimble 28aac020a6 Add test networking scheme.
This allows integration tests to test Player and offline with "real"
manifests and segments that are generated using ManifestGenerator and
StreamGenerator.  The networking scheme can also be used with an
unmodified Player.

b/29883614

Change-Id: I77aa5385ecaaac43ba713687befa2f064654375a
2016-07-12 21:52:36 +00:00
Joey Parrish 2585464faa Extend test timeouts to reduce flakiness
Based on several rounds of experiments, the timing on these tests was
determined to be too strict.  Extending delays and timeouts on these
tests reduces flakiness across browsers and platforms.

Change-Id: Ie36c86f3afcb615991454d098e690199ca063f96
2016-07-09 00:00:41 +00:00
Leandro Moreira a8c44da4b1 restructures test files 2016-07-01 09:53:30 -03:00