Commit Graph

13 Commits

Author SHA1 Message Date
Simon Lydell 4e1e98add2 fix: sendMessage promise should resolve to undefined when no listeners reply 2018-07-04 13:06:42 +02:00
Luca Greco 76eeeaccc9
feat: Added support for the sendResponse callback in the runtime.onMessage listeners (#97) 2018-05-14 20:38:21 +02:00
Luca Greco e19cf82332 fix: indentation missed by eslint 2016-11-07 16:34:34 +01:00
Luca Greco 705e93bc2f test: added test case to check that different listeners are wrapped by different wrappers 2016-11-07 16:34:34 +01:00
Luca Greco b28d3d9d74 fix: fixed typos and nits in tests. 2016-11-07 16:34:34 +01:00
Luca Greco 6486e551be fix: bulk fix call expression params indentation using eslint 2016-11-07 16:34:34 +01:00
Luca Greco 0517edaa67 fix: refactor runtime.onMessage tests. 2016-11-07 16:34:34 +01:00
Luca Greco 3842bd1693 style: destructure the assert methods to globals 2016-11-07 16:34:34 +01:00
Luca Greco 6cca044a5c test: add more test cases to reach a full code coverage.
- if the a browser global already exists, it should not be overridden
- use Object.defineProperty on the wrapped browser global
  (and test "has" for cached properties)
- delete a property defined with Object.defineProperty
- methods that are not wrapped are proxied correctly
- the special onMessage wrapper should not wrap a listener that is not
  a function
- test that a returned rejected Promise on the onMessage listener
  is turned in the parameter of the sendResponse callback
2016-11-07 16:34:34 +01:00
Luca Greco a1469d6f17 fix: added inline comments to special runtime.onMessage wrapper tests. 2016-11-07 16:34:34 +01:00
Luca Greco f28858961f fix: cleanup async function tests and other minor tweaks on tests. 2016-11-07 16:34:34 +01:00
Luca Greco b0a111cdc7 fix: init fake runtime.lastError to null. 2016-11-07 16:34:34 +01:00
Luca Greco c08b8af982 test: introduced a test suite for unit testing. 2016-11-07 16:33:42 +01:00