Commit Graph

9 Commits

Author SHA1 Message Date
Timothy Drews a0c35403e5 Add StreamingEngine tests and fix several bugs.
* Tidy up unit tests, and add more eviction tests and drift tests.
* Add integration tests.
* Handle end-of-stream and end-of-Period scenarios when segments
  are not perfectly aligned to Period boundaries.
* Use segment receipts to determine which segment to buffer next.
* Handle drift with eviction and other drift corner cases.
* Handle additional errors and improve overall robustness.

Change-Id: Ib57a255cda7a6e8c5857eb82accc14697983b893
2016-02-13 01:57:09 +00:00
Joey Parrish 97129b2310 Use StreamingEngine configure() to take in config
Change-Id: Ica651d25a353d84c44e8072c611b386c1c846b87
2016-02-10 11:42:54 -08:00
Timothy Drews f8b7b01fb0 Implement byte limits and segment eviction.
* StreamingEngine now limits buffers to a specified byte limit
  and evicts old segments as it appends new ones.

Change-Id: Id3e65bc45e782bf9d1214a6b52df0b92892606cb
2016-01-28 14:23:32 -08:00
Jacob Trimble 39c29ba237 Now runs the compiler over test code.
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
2016-01-28 12:21:40 -08:00
Jacob Trimble 3cc1a43b8d Added some networking utility functions.
This adds some utility functions to NetworkingEngine for common
actions.  This also cleans up the related unit tests.

Change-Id: I1105b77b6dac3637d566c1a4e2f77004ad705e8b
2016-01-25 09:27:38 -08:00
Jacob Trimble 926083e032 Namespaced test utility functions.
Now all the utility functions that are in test/util belong to
namespaces (shaka.test.Util and shaka.test.Dash).

Change-Id: I0bcb359616b02d58c63b1054425003e5a5646aaf
2016-01-21 12:01:54 -08:00
Timothy Drews d92e485040 Refactor fake event loop.
Moves fake event loop and instantaneous event processing
functions to test utilities.

Change-Id: I07a55f06b3ef7b2ae50f227971597724da4d50ff
2016-01-20 11:45:15 -08:00
Jacob Trimble 7cd09c266a Removed goog.require from test code.
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
2016-01-16 01:19:28 +00:00
Joey Parrish 24aab447f8 Rename spec/ to test/
Also renames *_spec.js to *_unit.js

Change-Id: I00602daa555cc1014e2a2a68201bb137d36ebada
2016-01-15 22:57:02 +00:00