var boxTestBaseUrl = 'http://download.tsi.telecom-paristech.fr/gpac/mp4box.js';
var boxtests = [
	{
		url: boxTestBaseUrl + "/mp4/box/sidx.mp4",
		rangeStart: 0,
		rangeSize: 36,
		boxname: "ftyp",
		data: {
			type: "ftyp",
			size: 36,
			major_brand: "iso5",
			minor_version: 1,
			compatible_brands: [ "avc1", "iso5", "dsms", "msix", "dash"]
		}
	},
	{ 
		url: boxTestBaseUrl + "/mp4/box/sidx.mp4",	
		rangeStart: 1566,
		rangeSize: 152,
		boxname: "sidx",
		data: {
			type: "sidx",
			size: 152,
			flags: 0,
			version: 0,
			reference_ID: 1,
			timescale: 24,
			earliest_presentation_time: 0,
			first_offset: 0,
			references: [
				{ 
					reference_type: 0,
					reference_size: 776279,
					subsegment_duration: 224,
					starts_with_SAP: 1,
					SAP_type: 1,
					SAP_delta_time: 0
				},
				{ 
					reference_type: 0,
					reference_size: 298018,
					subsegment_duration: 110,
					starts_with_SAP: 1,
					SAP_type: 1,
					SAP_delta_time: 0
				},
				{ 
					reference_type: 0,
					reference_size: 151055,
					subsegment_duration: 62,
					starts_with_SAP: 1,
					SAP_type: 1,
					SAP_delta_time: 0
				},
				{ 
					reference_type: 0,
					reference_size: 583055,
					subsegment_duration: 130,
					starts_with_SAP: 1,
					SAP_type: 1,
					SAP_delta_time: 0
				},
				{ 
					reference_type: 0,
					reference_size: 310294,
					subsegment_duration: 45,
					starts_with_SAP: 1,
					SAP_type: 1,
					SAP_delta_time: 0
				},
				{ 
					reference_type: 0,
					reference_size: 353217,
					subsegment_duration: 50,
					starts_with_SAP: 1,
					SAP_type: 1,
					SAP_delta_time: 0
				},
				{ 
					reference_type: 0,
					reference_size: 229078,
					subsegment_duration: 37,
					starts_with_SAP: 1,
					SAP_type: 1,
					SAP_delta_time: 0
				},
				{ 
					reference_type: 0,
					reference_size: 685457,
					subsegment_duration: 114,
					starts_with_SAP: 1,
					SAP_type: 1,
					SAP_delta_time: 0
				},
				{ 
					reference_type: 0,
					reference_size: 746586,
					subsegment_duration: 250,
					starts_with_SAP: 1,
					SAP_type: 1,
					SAP_delta_time: 0
				},
				{ 
					reference_type: 0,
					reference_size: 228474,
					subsegment_duration: 231,
					starts_with_SAP: 1,
					SAP_type: 1,
					SAP_delta_time: 0
				}
			]
		}
	},
	{
		url: boxTestBaseUrl + "/mp4/box/emsg.m4s",
		rangeStart: 106,
		rangeSize: 494,
		boxname: "emsg",
		data: {
			type: "emsg",
			size: 494,
			flags:	0,
			version:	0,
			scheme_id_uri:	"urn:mpeg:dash:event:2012",
			value:	"advert",
			timescale:	1,
			presentation_time_delta:	1,
			event_duration:	1,
			id:	1							
		}
	}
];

@@ -670,32 +670,33 @@
 ,%0A%09%09%09%09%09reference
+d
 _size: 776279,%0A%09
@@ -694,16 +694,16 @@
 776279,%0A
-
 %09%09%09%09%09sub
@@ -835,32 +835,33 @@
 ,%0A%09%09%09%09%09reference
+d
 _size: 298018,%0A%09
@@ -1004,24 +1004,25 @@
 %09%09%09reference
+d
 _size: 15105
@@ -1168,24 +1168,25 @@
 %09%09%09reference
+d
 _size: 58305
@@ -1329,32 +1329,33 @@
 ,%0A%09%09%09%09%09reference
+d
 _size: 310294,%0A%09
@@ -1497,24 +1497,25 @@
 %09%09%09reference
+d
 _size: 35321
@@ -1657,32 +1657,33 @@
 ,%0A%09%09%09%09%09reference
+d
 _size: 229078,%0A%09
@@ -1825,24 +1825,25 @@
 %09%09%09reference
+d
 _size: 68545
@@ -1990,24 +1990,25 @@
 %09%09%09reference
+d
 _size: 74658
@@ -2137,32 +2137,32 @@
 erence_type: 0,%0A
-
 %09%09%09%09%09reference_s
@@ -2159,16 +2159,17 @@
 eference
+d
 _size: 2

fix bug in unit test, wrong field name in sidx