This fixes the ContentProtection parsing to support non-IOP-compliant
manifests. This enables the unit tests for it, as well as adding
several more.
b/26982075
Change-Id: I0da2dbaa24ea2a6acf657b97f0a2e2d24ee3a16d
Sometimes the calculated $Time$ value is not an integer due to
floating-point rounding errors, but the $Time$ value filled into the
template must be an integer.
Change-Id: I5e61ac5143222620e8b5e1dfeb1847241c6a6876
It is the more common case for SegmentBase if the init segment comes
from the same URL as the media segments.
Change-Id: Ia9993471c892e103929729e2d496e0bc2f836b88
This also changes from using Node types to using Element types. This
is more correct since the code only deals with XML elements and not
with other Node types (e.g. text content nodes).
Change-Id: I0e8c7bf2adc1800a494e575b16661e8c69a7deb0
Rather than fail hundreds of tests, if we can detect that the browser
is not supported by the library, simply fail and cancel the rest of
the tests.
Change-Id: I4a4f1c04a389b690f0f58025f8b8bca4e94c6a29
Uses location to determine what the scheme should be if unspecified.
This is important because it allows us to use URIs that work for
either HTTP or HTTPS hosted apps without mixed content warnings.
Some special sauce was needed to make it testable, since we generally
can't mock location in tests.
Change-Id: I294ac532f1bba80977597e11addd7f585d1e9b79
Add extra info to util.Error in non-compiled builds so that we have
meaningful stack traces in test failures.
Change-Id: I351d2f65ef764947f8318372a47eeb6f014d7b16
Nullable callbacks can't be handled generically, since types won't
match the template. typeof(null) != typeof(function(){})
- Make customScheme non-nullable.
- Check number of parameters in callbacks.
- Add a test that covers customScheme setting and validation.
Change-Id: I58eb88fc667bfa8ab13a679f1b1eed0c894e3755
Safari adds extra properties 'line', 'column', and 'sourceURL' to
thrown objects, including our own home-grown Error object. Ignore
these extra properties in tests.
Change-Id: I2c84aae8d64fad7dd6cc8c7e287da70bff0efb59
This fixes small incompatibilities for IE11:
- XML parser sometimes fails by throwing rather than returning null
- bug in Promise polyfill prevented use of Promise.all([null, p])
- IE11 does not have ArrayBuffer.prototype.slice, used by integration
tests to clone a buffer in StreamGenerator
Change-Id: I9ace6bd17cd60272f85ce388342ca456f14d04c9
* StreamingEngine now limits buffers to a specified byte limit
and evicts old segments as it appends new ones.
Change-Id: Id3e65bc45e782bf9d1214a6b52df0b92892606cb
When the check script is run, it will run the compiler over the test
code also, it does not keep the output. This allows type checking of
the test code. This change also fixes several bugs that were
discovered.
Change-Id: I35ffc80e8785e1afd9e6252db915645c5b48b5d4
The optional arguments in this convenience function really only help
in the tests. To avoid some component in the library accidentally
making a request with default retry parameters instead of those
configured by the user, I'm making the retry parameters required.
The optional argument for method is only used once. To avoid the
temptation to add more positional arguments for other seldom-used
fields, I'm dropping the method argument completely.
Change-Id: Ib0afb5766f68c5505f11372e3b004fc8eaca1223
This adds some utility functions to NetworkingEngine for common
actions. This also cleans up the related unit tests.
Change-Id: I1105b77b6dac3637d566c1a4e2f77004ad705e8b
Now all the utility functions that are in test/util belong to
namespaces (shaka.test.Util and shaka.test.Dash).
Change-Id: I0bcb359616b02d58c63b1054425003e5a5646aaf
This removed any goog.require from the test code to make it simpler.
Now, shaka-player.uncompiled is required to be loaded before any
tests. This fixes some dependency problems.
This also moves the utility test code to test/util.
Change-Id: I8991a61fc59c9c03e0143bb0883fd6d166af86c2
This makes it possible for the few parts of the code which will use
headers to do so without relying on assumptions about case.
Change-Id: I3b1ca57a3d789d18d51b4ee94f0791daf301993f