Commit Graph

10 Commits

Author SHA1 Message Date
Jacob Trimble 78d9fc840a Convert network tests to ES6.
Issue #1157

Change-Id: I30e39927c70d61f29d45698507b6ba809b33e2f3
2019-05-30 19:57:36 +00:00
Joey Parrish 393b0ecea7 Fix HTTP test failures
This makes progress callbacks into a required parameter on all network
scheme plugins.  This does not mean that every plugin must make use of
the callback, but every caller must supply the callback.

In production, NetworkingEngine already supplies this callback
universally, so our HTTP plugins make use of it whenever progress data
is available.

Our tests, however, did not always supply this callback, leading to
test failures.  These failures were more likely to show up in Jasmine
3 than Jasmine 2 for some reason, which caused us to downgrade back to
Jasmine 2 recently.

By making the callback required, we can clean up this inconsistency
between test and production and give the HTTP plugins what they expect
in all cases.

Issue #1949

Change-Id: I8a6e1904e73cf7ca6ae8f3964261c339f404854d
2019-05-22 15:42:06 +00:00
Jacob Trimble 74918b90ec Convert networking files to ES6.
Issue #1157

Change-Id: Iae83b88881b351c97e8ec020625167f5f700f97e
2019-05-20 17:10:06 +00:00
Jacob Trimble 47daf49f31 Use arrow functions for callbacks.
This is an automated change to convert use of "function" functions
to arrow functions.  This doesn't change all uses of bind() that
could be converted.  This also doesn't remove all "function" functions.

Change-Id: I40ac7d086bcef947a1be083359c8fd1d4499a9c3
2019-05-09 16:40:46 +00:00
Jacob Trimble c81389741f Prefer const over let.
A coming update to the Google eslint config will require using "const"
over "let".  This makes that one change to isolate the big changes.

Change-Id: I7d0974c3ae15c53cc45a6b07bf9f6586e2d34aca
2019-05-08 09:22:10 -07:00
Joey Parrish fd0449d8f7 Re-enable some disabled style rules
This re-enables the following style rules:
  - "block-spacing"
  - "brace-style"
  - "comma-dangle"
  - "comma-spacing"
  - "new-cap"
  - "no-multi-spaces"
  - "no-multiple-empty-lines"
  - "one-var"
  - "padded-blocks"
  - "prefer-rest-params"

Change-Id: I15d616e8d5b88b273ded6128b4f9ad86bdb26bd1
2018-07-09 19:44:56 +00:00
Jacob Trimble 0154dbc4d4 Convert 'var' to 'let'/'const' (6 of 9).
This is part of a change to convert all usages of 'var' with either
'let' or 'const'.  This takes a conservative approach for 'const' where
it will only be used for aliases and storing the "original" values in
tests.

Change-Id: I475eba0a477d13cd9201c88ad44899d521ad8991
2018-02-20 11:28:02 -08:00
Joey Parrish 2f55d2a3bd Use AbortableOperation in networking
This uses AbortableOperation in all networking, from the scheme
plugins all the way to the request interface.

This also updates all default scheme plugins, docs, and sample code.

Backward compatibility is provided for scheme plugins and the
request API in NetworkingEngine.  This compatibility will be
removed in v2.5.

Two cancelation-related tests have been disabled in
player_integration until the new abort interface has been adopted
in the manifest parsers.

Issue #829

Change-Id: I91c8e6efe97798d111e8ddca5655cddc1f6bcbf3
2018-01-29 19:23:47 +00:00
Lucas Gabriel Sánchez 403a141f2c Use data URI content-type for manifest type detection (#550)
* Fix when using Data URIs for the manifest
* update test/net/data_uri_plugin_unit.js to test Data URIs content-type header response
2016-10-19 09:50:07 -07:00
Leandro Moreira a8c44da4b1 restructures test files 2016-07-01 09:53:30 -03:00