Commit Graph

107 Commits

Author SHA1 Message Date
Joey Parrish 374653abba [ES6] Use babel to preprocess tests
Once we start moving to ES6, uncompiled mode stops working on non-ES6
browsers (IE11 is the only one we test on).  We can disable uncompiled
mode in the demo, but we still want our tests to be uncompiled.  With
uncompiled library & tests, we can test units that are not exported
and even access private members that would otherwise be renamed.

For production/demo, Babel plays no role.  The Closure Compiler will
take in ES6 and spit out ES3 syntax (even older than ES5, so we can
at least run & fail a support check).

Babel will be used by Karma to preprocess all test and library code
before serving it from Karma.  This will allow us to use ES6 in both
the library and the tests, and still run uncompiled tests and test the
uncompiled library on ES5 browsers such as IE 11.

Issue #1157

Change-Id: Idd185d0e231d16b6df52babda777111e85890012
2018-01-05 20:10:42 +00:00
Joey Parrish b763bf43d9 Bump version numbers for v2.3
Change-Id: I0e2e1540871223e71c56e10cf6b940f391943e57
2017-12-20 16:29:53 -08:00
Michelle Zhuo e516a64487 Transmux from Transport Stream to MP4
Supporting Transport Stream by transmuxing it to MP4, with mux.js
library.

Issue #887

Change-Id: I70361bb364721fc5e72cba7d0fabc311ce0ba8b5
2017-10-20 18:14:02 +00:00
Jacob Trimble 56740adffb Have all.py build both debug and release builds.
Change-Id: I67e830d45f7d4383b313c835c55b3119349ab1d2
2017-10-19 20:22:07 +00:00
Joey Parrish 43f9b56836 Update jasmine-core
This updates our jasmine-core dependency to the latest version.
In v2.8, some of the output from test failures is much more legible
than in v2.6.

Change-Id: I56ac0aa47fdd18ac57108c1e481ef9269269da51
2017-08-28 23:32:10 +00:00
Joey Parrish 6a7370b106 Update changelog and versions for v2.2.0
Change-Id: I9b022dd185c2c431dbf6dbf3cd9b9fabd4ce6356
2017-08-22 21:40:46 +00:00
Joey Parrish fdfa27083d Update which module to simplify browser list
Now that npm/node-which#51 is closed and the fix has been released in
which v1.3.0, we can simplify away the try/catch when we check for
available browsers.

Change-Id: If849299f75e5e4927756a1692ebe017dd5d80f34
2017-08-01 10:52:43 -07:00
Joey Parrish 6b46d49d2a Add "build/test.py --browsers help" to list all
Now we can snoop in the karma config and find a list of all usable
browser launchers.  This allows us to provide hints for what browsers
could be used.

Change-Id: I7116eb72957c7f8b924380c26c4c66cdca50c0bc
2017-07-31 19:19:15 +00:00
Joey Parrish 96efea1c37 Force a rebuild during publication
This fixes an issue in which we released several builds (v2.1.3,
v2.0.4, and v2.0.3) with the wrong version number.  This happens when
we build, then tag, then release.

By forcing a rebuild at publication time, we make sure the build we
release has the right tag in it.

Issue #869

Change-Id: I23867ceef43162469c53006336b7f0226dbe16b6
2017-06-12 15:58:05 -07:00
Joey Parrish fae6463513 Update all node modules
Change-Id: I85be9d4e4224d9e9a3b3f69a5b63af359b9534b5
2017-05-10 16:38:19 +00:00
Joey Parrish a51a1b3584 Upgrade jasmine-core
This upgrades jasmine-core to a version with jasmine/jasmine#1138
fixed.

Change-Id: I5021ad8d3a6942afc85370ce0ff15bd07fd0945e
2017-05-10 16:37:50 +00:00
Joey Parrish fd8453a016 Fix test failures caused by jasmine-core v2.6.0
In jasmine-core v2.6.0, our DASH tests fail with "first.getUris is not
a function".  The cause is unclear, but rolling back to jasmine-core
v2.5.x fixes the failures.

Change-Id: I5a2d8384d601677da9e8e16f6cfcab668c8b5117
2017-04-24 15:44:43 -07:00
Joey Parrish e37cba8e35 Update changelog and bump versions for v2.1.0
Change-Id: I192e17601ec0c798ffa76020584666bd3043897c
2017-04-20 21:42:24 +00:00
Jacob Trimble e5ce395f37 Implement gap jumping.
The bulk of the logic for gap jumping is handled in Playhead.  It
tracks the current buffered ranges and jumps over any gaps that appear.
It listens for a special browser event ('waiting') for when the video
element runs out of playable frames.

This change also removes the logic for jumping gaps at the beginning
of the timeline.  This is handled by the more general gap jumping
logic and works cross-browser.

Finally, this updates the buffering logic to only count the amount of
content buffered (i.e. ignoring the gaps).  This fixes some bugs where
gaps in the content can result in StreamingEngine buffering forever
since it thinks only a little is buffered.

This includes full implementation of the logic, but this doesn't close
the issue since there aren't any integration tests yet.  Those will
be added next.

Issue #555

Change-Id: Id99eb9fe469e8cf2c7464a3d70c3733791e806e0
2017-04-17 18:15:23 +00:00
Jacob Trimble 55b8ef4b65 Add Edge launcher to npm modules.
Change-Id: I8902d81cbc833284efb04b4336734389b579a9e5
2017-03-17 12:07:45 -07:00
Joey Parrish 8ba088a38f Generate externs automatically
We were not able to get our externs generated by the Closure compiler.
There were many issues with the Closure-generated externs, including
the order of the externs and the replacement of record types and enums
with their underlying types.

We made a few attempts to patch the compiler, but could not get our
patches accepted upstream.

This change introduces a new script to generate our externs from
scratch.  It uses a JavaScript parser called 'esprima'.

Some interfaces need to be exported to the generated externs, but are
not actually attached to the namespace by the compiler.  For this, we
introduce a new annotation.  These are the currently-supported export
annotations:

 - @export: truly exported (attached to namespace) by the compiler
 - @expose: truly exposed (not renamed) by the compiler
 - @exportDoc: considered part of the exports in the docs
 - @exportInterface: considered part of the exports in generated externs

These annotations are now documented in docs/design/export.md

Change-Id: I33bf7384889c14c9edb0fa5f11caa7c4f4d79af6
2017-02-01 11:42:16 -08:00
Joey Parrish ce72a46b84 Update useragent module to an official release
3rd-Eden/useragent#99 was merged and the changes were released in
version 2.1.11.  We can now detect Chromecast devices in Karma.

Change-Id: I3d326d9ef82eb878d3a42c1d442543bb503b2ce7
2017-01-19 09:33:12 -08:00
Joey Parrish f25e947c5d Use forked useragent module for Chromecast detection
This is temporary until 3rd-Eden/useragent#99 is merged and released.

Change-Id: I94e2c3aac7c9a6bed4c3947f36468bb1a6e35ee0
2017-01-18 23:32:32 +00:00
Joey Parrish 6f65df26c5 Whitelist svg camelcase attributes in htmlhint
This is better than ignoring all camelcase.

Introduced by yaniswang/HTMLHint#121 and released in 0.9.13.

However, 0.9.13 is incompatible with node v0.10.  This was fixed
in yaniswang/HTMLHint#132, but there has not been a release since
(in 8 months).

Therefore we are pinning to today's git version instead of a release.
This gets us the camelcase whitelisting feature and doesn't break with
node v0.10.

Change-Id: I1e3b6c0c96ef24662b46497b1a601bde0dae5704
2017-01-18 13:59:54 -08:00
Joey Parrish d22900692e Upgrade jasmine-ajax and enable redirect test
Change-Id: I514090f160099ad4afc3446100a4753f714fbbff
2017-01-18 21:34:02 +00:00
Jacob Trimble 40aab9387e Allow compiling a debug compiled file.
This adds a new option (--debug) to build/build.py which allows
building for debugging.  This will expose all internal members on the
global |shaka| object and will not rename anything.  This allows apps
to import the single compiled file but still perform debugging.

This also changes the file naming a little.  Before, we would create
a |.debug.js| and |.debug.map| file when we compiled.  However this
was not a debug file, it just linked to the source map.  Now it will
always generate the source map and attach it to the compiled file.  If
compiling with --debug it will add |.debug| to the file name.

This should also help with importing the debug library in ES6.
Issue #466

Change-Id: Ic51abbdb04763e8a3687c5d59a23d721436e1c7b
2016-12-20 00:43:44 +00:00
Joey Parrish 17d63566b4 Update changelog and versions for v2.0.0
Change-Id: If1881dc31e5f65e5918d459209e605570c95891a
2016-09-06 18:26:29 +00:00
Joey Parrish 617bc5b3b4 Upgrade Karma to v1
This improves some disconnection errors on Safari.

Change-Id: I679d7751b9371c03e71df12d9914ebf2b5a15ee1
2016-08-10 16:27:41 +00:00
Joey Parrish 3978a8626b Update changelog and versions for v2.0.0-beta3
Change-Id: I0eebb4d035c9432376659e19e388c37b2454b954
2016-07-29 18:42:37 +00:00
Joey Parrish d733c8eee2 Update changelog and versions for v2.0.0-beta2
Change-Id: I474c2ff1a1a14aa2b1f1569e59e1c27326d59a7f
2016-05-04 00:47:34 -07:00
Joey Parrish 46dffbfcea Require an older htmlhint
The latest htmlhint (v0.9.13) does not work with node v0.10, which
is what Ubuntu 14 LTS comes with.

See yaniswang/HTMLHint#132 for more details.

Change-Id: Ib148164828317ec56fa32ce3a7b21ae4061333f6
2016-05-02 04:13:26 -07:00
Joey Parrish 06142be8fe Update changelog and bump versions for v2.0.0-beta
Also make version checking liberal enough to allow -beta.

Change-Id: I75dbffb78f3bc96f0f9a6c4a34fa2c639c419caf
2016-04-07 21:49:52 +00:00
Joey Parrish bda33cc9b6 Demo app v2
Still missing custom controls for live, but otherwise functional.

UI design and CSS based on work by Sam Dutton.

Change-Id: I0ee41254fb3b145822b018dff87aa583d6bef179
2016-03-30 00:36:32 +00:00
Joey Parrish 7433b47c2a Player integration tests
Tests all demo assets through the compiled library.  To debug,
use --uncompiled to run them with the uncompiled library.

These new tests are off by default because they use external assets
and run very slowly.  Use --external to run these tests.

Change-Id: If1648108dbb9a323d59f6b0e14b4fe6c446a90d2
2016-03-23 19:00:10 +00:00
Joey Parrish 6c000192d7 Expand WebDriver browsers
This expands our list of browser targets using WebDriver and drops
the BrowserStack targets.  We will no longer be using BrowserStack.

This also drops xvfb-run for Linux.  As we move toward testing
primarily over WebDriver, the overhead of starting an Xvfb is not
necessary.

Change-Id: If2dd26caf3dea88ba39c20644f329451de48c273
2016-03-16 15:41:08 -07:00
Joey Parrish cda0678dc4 Merge v2 preview branch into master
We will now drop the v2 preview branch.
2016-03-15 14:12:03 -07:00
Joey Parrish 515b6fd170 Specify versions for all deps
Change-Id: Iac39267f3c597614f14b4c72b713c22375ece5a1
2016-03-10 22:40:29 +00:00
Joey Parrish b89775ca30 Update changelog and bump versions for 1.6.4
Change-Id: I6fe994426d5e0b67b66a2ea286e0580cc2593a98
2016-02-27 10:11:20 -08:00
Joey Parrish 66aaa76048 Sort node deps
Change-Id: I07197e70dd116e5b14ce36264acee8395ae734bd
2016-02-26 10:46:25 -08:00
Jacob Trimble 5d51740225 Disable logging in tests; added argument to enable logging.
By default, the tests will not print logging.  With the argument
--enable-logging=level, it will output logging.  |level| is a number
of the log level, or can be missing to use INFO.

Also, it will use the 'spec' reporter which will print each test that
is run. Logs are printed above the name of the test that caused them.

Change-Id: I697b0c1dd0b6648cddc79efa9c7a54da877d0303
2016-02-22 20:49:02 +00:00
Chad Assareh 1c82f75786 Adding webdriver browsers to karma conf.
Change-Id: I2f2a93aca79d44bc4051195260011ef4c9643e13
2016-02-19 22:23:25 +00:00
Joey Parrish 87ac05e902 Update changelog and bump versions for 1.6.3
Change-Id: Ibf4b28cfab02b21a8c77035fc3d14736c322ef98
2016-02-08 12:09:57 -08:00
Jacob Trimble 92075fbc29 Replaced remaining build scripts with python.
This also makes all build scripts runnable on Windows using both
Cygwin and native python.

Change-Id: If324800b8b899cac1cc715d30383255cd5f6ee71
2016-02-02 00:37:42 +00:00
Joey Parrish c6f61b768a Add BrowserStack launcher support to karma config
This requires login information in the form of environment variables
BROWSER_STACK_USERNAME and BROWSER_STACK_ACCESS_KEY.

Change-Id: Iec52aa58da278dc9015e3d9d3cefa092e0b09af7
2016-01-29 08:59:41 -08:00
Jacob Trimble 75acfad410 Increased karma version.
socket.io made recent breaking changes to their internals that
older versions of karma uses (See karma-runner/karma#1782).

The old bug with newer karma versions has disappeared and is
assumed fixed (See 817ea3d5).

Change-Id: Id1efa635de34f3d864c51c784b2343b8c9d9adee
2016-01-26 12:28:08 -08:00
Joey Parrish 4905db53e2 Add sprintf plugin to use in tests
Change-Id: I4c9702a7d74babf7d62baff8a6059a8982e9fb29
2016-01-08 11:24:58 -08:00
Joey Parrish cd2c323785 Generate HTML coverage reports
Optional, using command-line flag --html-coverage-report.
Very useful for reviewing specifics of test coverage.

Change-Id: Iadcf86df0affe9e61f1bde674f51af9b6c21c5b3
2016-01-07 13:58:20 -08:00
Joey Parrish 58003ff9d6 Overhaul build and docs layout
* Move redesign docs to docs/design/
* Put all build output (including closure deps) in dist/
* Restore doc-building scripts
* Fix small doc error in MPD utils

Change-Id: I930f4f976370885b3c3c37c59f1ae7fcc5522413
2016-01-04 12:33:10 -08:00
Joey Parrish 4ec3d3a67a Clean up node metadata
- Fix dev-dependency installation
- Fix npm license format warning
- Ignore node_modules

Now dev-deps can be installed simply by running "npm install".
Because of npm/npm#3059, this requires the in-publish module.

Change-Id: Idc2eeca5b172de50760a6fadacb1d1088985f840
2015-12-15 20:32:13 -08:00
Joey Parrish e0ecfe44e0 Update changelog and bump versions for 1.6.2
Change-Id: If521bce9c9b555356ea44375405f55843cff2eca
2015-12-14 12:18:34 -08:00
Joey Parrish c9f8ab5c47 Update changelog and bump versions for 1.6.1
Change-Id: Iaed12d39f96e3b71f59a3399bf71f47fee317275
2015-12-06 14:29:57 -08:00
Joey Parrish 817ea3d5ab Avoid karma v0.13.15
Avoid karma v0.13.15, which has a bug that prevents our new
integration tests from running correctly on Chrome.
(See karma-runner/karma#1101)

Change-Id: Ia81410b1184ddca3a703d71cd923d4ec0ae5eefc
2015-11-25 22:36:58 +00:00
Joey Parrish 00c7b08222 Add dev dependencies for automated testing
This makes it clear and explicit which node modules we need to run
tests.  Anyone installing Shaka Player via npm can get the deps
automatically.

Change-Id: I77456d3351775444a2bc669dd0129ce4afc0d1a6
2015-11-25 12:14:05 -08:00
Joey Parrish 05e593d5e8 Update changelog and bump versions for 1.6.0
Change-Id: I8fdb562b35bdb2ae77a8250990bfeb0058c8faa7
2015-11-16 14:48:27 -08:00
Timothy Drews 0ee549727a Bump version numbers for v1.5.0
Change-Id: Ifcf55b95091763f18f652dadc03f2d37f986c072
2015-09-17 14:41:12 -07:00