test_device_sync_diff.js File Reference

Go to the source code of this file.

Functions

Components utils import ("resource://app/jsmodules/sbProperties.jsm")
 Device tests - Device Sync Diff. More...
 
 forEach (function(data){mainLibItems[data[0]]={track:data[1], artist:data[2], album:data[3], lastModified:data[4]};})
 
function verifyChanges (actual, expected)
 
function populateLibraries (mainLib, deviceLib)
 
function dumpChanges (title, changeset)
 
function runTest ()
 Advanced DataRemote unit tests. More...
 

Variables

const TimeLastSynced = 1000
 
const TimeAfter = TimeLastSynced + 10
 
const TimeBefore = TimeLastSynced - 10
 
var mainLibItems = {}
 
var mainLibLists = {}
 
var deviceItems = {}
 
var deviceLists = {}
 
const ADDED = Ci.sbIChangeOperation.ADDED
 
const MODIFIED = Ci.sbIChangeOperation.MODIFIED
 
var expectedExportChanges
 
var expectedImportChanges
 

Function Documentation

function dumpChanges (   title,
  changeset 
)

Definition at line 237 of file test_device_sync_diff.js.

WINDOW_HIDEABLE_FEATURES forEach ( function(data){mainLibItems[data[0]]={track:data[1], artist:data[2], album:data[3], lastModified:data[4]};}  )
Components utils import ( "resource://app/jsmodules/sbProperties.jsm"  )

Device tests - Device Sync Diff.

function populateLibraries (   mainLib,
  deviceLib 
)

Definition at line 157 of file test_device_sync_diff.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function runTest ( )

Advanced DataRemote unit tests.

Minimal sanity check for the AddonMetadata Datasource. Assumes that coppery will be installed.

BEGIN SONGBIRD GPL

This file is part of the Songbird web player.

Copyright(c) 2005-2008 POTI, Inc. http://songbirdnest.com

This file may be licensed under the terms of of the GNU General Public License Version 2 (the "GPL").

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the GPL for the specific language governing rights and limitations.

You should have received a copy of the GPL along with this program. If not, go to http://www.gnu.org/licenses/gpl.html or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

END SONGBIRD GPL Initial file to test testharness architecture. Ultimately this file would hold more advanced unit tests.

Advanced DataRemote unit tests.

BEGIN SONGBIRD GPL

This file is part of the Songbird web player.

Copyright(c) 2005-2008 POTI, Inc. http://songbirdnest.com

This file may be licensed under the terms of of the GNU General Public License Version 2 (the "GPL").

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the GPL for the specific language governing rights and limitations.

You should have received a copy of the GPL along with this program. If not, go to http://www.gnu.org/licenses/gpl.html or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

END SONGBIRD GPL

Advanced DataRemote unit tests.

Definition at line 259 of file test_device_sync_diff.js.

Here is the call graph for this function:

function verifyChanges (   actual,
  expected 
)

Definition at line 139 of file test_device_sync_diff.js.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const ADDED = Ci.sbIChangeOperation.ADDED

Definition at line 114 of file test_device_sync_diff.js.

var deviceItems = {}

Definition at line 71 of file test_device_sync_diff.js.

var deviceLists = {}

Definition at line 100 of file test_device_sync_diff.js.

var expectedExportChanges
Initial value:
= [
{change: ADDED, source: mainLibItems['track3']},
{change: ADDED, source: mainLibItems['track6']},
{change: MODIFIED, source: mainLibItems['track8'],
dest: deviceItems['track8']},
{change: MODIFIED, source: mainLibLists['list3'],
dest: deviceLists['list3']},
{change: MODIFIED, source: mainLibLists['list4'],
dest: deviceLists['list4']},
{change: ADDED, source: mainLibLists['list5']},
]
var deviceItems
var deviceLists
var mainLibLists
const MODIFIED
var mainLibItems
const ADDED

Definition at line 117 of file test_device_sync_diff.js.

var expectedImportChanges
Initial value:
= [
{change: ADDED, source: deviceItems['track4']},
{change: ADDED, source: deviceItems['track6']},
{change: MODIFIED, source: deviceLists['list1'],
dest: mainLibLists['list1']},
{change: ADDED, source: deviceLists['list6']},
]
var deviceItems
var deviceLists
var mainLibLists
const MODIFIED
const ADDED

Definition at line 130 of file test_device_sync_diff.js.

var mainLibItems = {}

Definition at line 38 of file test_device_sync_diff.js.

var mainLibLists = {}

Definition at line 56 of file test_device_sync_diff.js.

const MODIFIED = Ci.sbIChangeOperation.MODIFIED

Definition at line 115 of file test_device_sync_diff.js.

const TimeAfter = TimeLastSynced + 10

Definition at line 35 of file test_device_sync_diff.js.

const TimeBefore = TimeLastSynced - 10

Definition at line 36 of file test_device_sync_diff.js.

const TimeLastSynced = 1000

Definition at line 34 of file test_device_sync_diff.js.