test_BaseMediacoreEventTarget.js File Reference

Go to the source code of this file.

Functions

Components utils import ("resource://gre/modules/XPCOMUtils.jsm")
 Test the media core listener. More...
 
function testListener ()
 
function createEventTarget ()
 
function createEvent (type, error, data)
 
function runTest ()
 Advanced DataRemote unit tests. More...
 
function testSimpleListener (async)
 

Variables

testListener prototype
 
var eventTarget = null
 
var listener = null
 

Function Documentation

function createEvent (   type,
  error,
  data 
)

Definition at line 78 of file test_BaseMediacoreEventTarget.js.

Here is the caller graph for this function:

function createEventTarget ( )

Definition at line 73 of file test_BaseMediacoreEventTarget.js.

Here is the caller graph for this function:

Components utils import ( "resource://gre/modules/XPCOMUtils.jsm"  )

Test the media core listener.

function runTest ( )

Advanced DataRemote unit tests.

Tests single thread synchronous and asynchronous events

Definition at line 87 of file test_BaseMediacoreEventTarget.js.

Here is the call graph for this function:

function testListener ( )

Definition at line 36 of file test_BaseMediacoreEventTarget.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function testSimpleListener (   async)

Definition at line 104 of file test_BaseMediacoreEventTarget.js.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

var eventTarget = null

Definition at line 101 of file test_BaseMediacoreEventTarget.js.

var listener = null

Definition at line 102 of file test_BaseMediacoreEventTarget.js.

testListener prototype
Initial value:
= {
QueryInterface: XPCOMUtils.generateQI([Ci.sbIMediacoreEventListener]),
onMediacoreEvent: function(event) {
this.log.push(event);
if (this.onEnd && event.type == Ci.sbIMediacoreEvent.STREAM_END) {
this.onEnd();
}
}
}
function dummyCore() {
this.wrappedJSObject = this;
}
dummyCore.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.sbIMediacore]),
}
var eventIDs = [Ci.sbIMediacoreEvent.METADATA_CHANGE,
Ci.sbIMediacoreEvent.URI_CHANGE,
Ci.sbIMediacoreEvent.DURATION_CHANGE,
Ci.sbIMediacoreEvent.VOLUME_CHANGE,
Ci.sbIMediacoreEvent.MUTE_CHANGE,
Ci.sbIMediacoreEvent.STREAM_FOUND,
Ci.sbIMediacoreEvent.BUFFERING,
Ci.sbIMediacoreEvent.BUFFER_UNDERRUN,
Ci.sbIMediacoreEvent.STREAM_START,
Ci.sbIMediacoreEvent.STREAM_PAUSE,
Ci.sbIMediacoreEvent.STREAM_END]
function log(s)
function testFinished()
var event
sbOSDControlService prototype QueryInterface
const Ci

Definition at line 42 of file test_BaseMediacoreEventTarget.js.