Bug 1222866 - P3. Fix mochitest. r=me, a=lizzard
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 20 Nov 2015 20:14:51 +1100
changeset 296807 044c31c25c3cf99ead4174e942025dd7b16af620
parent 296806 4d2073dcbd5a1f3f81efb9d3059e45fd59064419
child 296808 5dc47809b28cf048def41df5c5375b04d9838292
push id5349
push usercbook@mozilla.com
push dateTue, 24 Nov 2015 11:22:59 +0000
treeherdermozilla-beta@044c31c25c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme, lizzard
bugs1222866
milestone43.0
Bug 1222866 - P3. Fix mochitest. r=me, a=lizzard Actual calculated duration was 9.2879819869995117. The new behaviour and rounded value is as such more correct
dom/media/test/manifest.js
dom/media/test/test_fragment_play.html
--- a/dom/media/test/manifest.js
+++ b/dom/media/test/manifest.js
@@ -57,17 +57,17 @@ var gVideoTests = [
   { name:"seek.webm", type:"video/webm", width:320, height:240, duration:3.966 },
   { name:"bogus.duh", type:"bogus/duh" }
 ];
 
 // Used by test_progress to ensure we get the correct progress information
 // during resource download.
 var gProgressTests = [
   { name:"r11025_u8_c1.wav", type:"audio/x-wav", duration:1.0, size:11069 },
-  { name:"big.wav", type:"audio/x-wav", duration:9.278981, size:102444 },
+  { name:"big.wav", type:"audio/x-wav", duration:9.278982, size:102444 },
   { name:"seek.ogv", type:"video/ogg", duration:3.966, size:285310 },
   { name:"320x240.ogv", type:"video/ogg", width:320, height:240, duration:0.266, size:28942 },
   { name:"seek.webm", type:"video/webm", duration:3.966, size:215529 },
   { name:"gizmo.mp4", type:"video/mp4", duration:5.56, size:383631 },
   { name:"bogus.duh", type:"bogus/duh" }
 ];
 
 // Used by test_played.html
@@ -104,17 +104,17 @@ var gReplayTests = gSmallTests.concat([
 var gPausedAfterEndedTests = gSmallTests.concat([
   { name:"r11025_u8_c1.wav", type:"audio/x-wav", duration:1.0 },
   { name:"small-shot.ogg", type:"video/ogg", duration:0.276 }
 ]);
 
 // Test the mozHasAudio property, and APIs that detect different kinds of
 // tracks
 var gTrackTests = [
-  { name:"big.wav", type:"audio/x-wav", duration:9.278981, size:102444, hasAudio:true, hasVideo:false },
+  { name:"big.wav", type:"audio/x-wav", duration:9.278982, size:102444, hasAudio:true, hasVideo:false },
   { name:"320x240.ogv", type:"video/ogg", width:320, height:240, duration:0.266, size:28942, hasAudio:false, hasVideo:true },
   { name:"short-video.ogv", type:"video/ogg", duration:1.081, hasAudio:true, hasVideo:true },
   { name:"seek.webm", type:"video/webm", duration:3.966, size:215529, hasAudio:false, hasVideo:true },
   { name:"bogus.duh", type:"bogus/duh" }
 ];
 
 var gClosingConnectionsTest = [
   { name:"seek.ogv", type:"video/ogg", duration:3.966 }
@@ -256,17 +256,17 @@ var gPlayTests = [
   { name:"vbr-head.mp3", type:"audio/mpeg", duration:10.00 },
 
   // Invalid file
   { name:"bogus.duh", type:"bogus/duh", duration:Number.NaN },
 ];
 
 // A file for each type we can support.
 var gSnifferTests = [
-  { name:"big.wav", type:"audio/x-wav", duration:9.278981, size:102444 },
+  { name:"big.wav", type:"audio/x-wav", duration:9.278982, size:102444 },
   { name:"320x240.ogv", type:"video/ogg", width:320, height:240, duration:0.233, size:28942 },
   { name:"seek.webm", type:"video/webm", duration:3.966, size:215529 },
   { name:"gizmo.mp4", type:"video/mp4", duration:5.56, size:383631 },
   // A mp3 file with id3 tags.
   { name:"id3tags.mp3", type:"audio/mpeg", duration:0.28, size:3530},
   { name:"bogus.duh", type:"bogus/duh" }
 ];
 
@@ -549,17 +549,17 @@ var gDecodeErrorTests = [
   { name:"bogus.wav", type:"audio/x-wav" },
   { name:"bogus.ogv", type:"video/ogg" },
 
   { name:"bogus.duh", type:"bogus/duh" }
 ];
 
 // These are files that are used for media fragments tests
 var gFragmentTests = [
-  { name:"big.wav", type:"audio/x-wav", duration:9.278981, size:102444 }
+  { name:"big.wav", type:"audio/x-wav", duration:9.278982, size:102444 }
 ];
 
 // Used by test_chaining.html. The |links| attributes is the number of links in
 // this file that we should be able to play.
 var gChainingTests = [
   // Vorbis and Opus chained file. They have user comments |index=n| where `n`
   // is the index of this segment in the file, 0 indexed.
   { name:"chain.ogg", type:"audio/ogg", links: 4},
--- a/dom/media/test/test_fragment_play.html
+++ b/dom/media/test/test_fragment_play.html
@@ -18,17 +18,17 @@ var manager = new MediaTestManager;
 // try playing the video. Tests for other fragment
 // formats are in test_fragment_noplay.html.
 var gFragmentParams = [
   { fragment: "", start: null, end: null },
   { fragment: "#t=,", start: null, end: null },
   { fragment: "#t=3,3", start: null, end: null },
   { fragment: "#t=7,3", start: null, end: null },
   { fragment: "#t=7,15", start: 7, end: null },
-  { fragment: "#t=15,20", start: 9.287981, end: null },
+  { fragment: "#t=15,20", start: 9.287982, end: null },
   { fragment: "#t=5", start: 5, end: null },
   { fragment: "#t=5.5", start: 5.5, end: null },
   { fragment: "#t=5,", start: null, end: null },
   { fragment: "#t=,5", start: 0, end: 5, todo: "See bugs 682141 and 720248" },
   { fragment: "#t=2.5,5.5", start: 2.5, end: 5.5, todo: "See bugs 682141 and 720248" },
   { fragment: "#t=1,2.5", start: 1, end: 2.5, todo: "See bugs 682141 and 720248" },
   { fragment: "#t=,15", start: 0, end: null }
 ];