These tests were a little flaky on Edge.
Rather than just adding a small delay to cover Promise resolution, now
we wait for the actual Promise, then add a small delay to cover the
setting of the status member.
Change-Id: I7462d3b308afd59ea036d6b0ec0ddfd4a87c71bc
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
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