Bug 1020538 - Re-enable test_playback_rate.html on Linux, OSX, and Android. r=cpearce
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 05 Jun 2014 12:41:52 -0400
changeset 186857 12e8837e166a3f0c6ba880d1372c73aea8ec000a
parent 186856 2a2526aa56f44c8e8ce159e2f34d6ada20f61d20
child 186858 5203fa15941366fa8ef557a0065915735d273a5d
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerscpearce
bugs1020538
milestone32.0a1
Bug 1020538 - Re-enable test_playback_rate.html on Linux, OSX, and Android. r=cpearce
content/media/test/mochitest.ini
content/media/test/test_playback_rate.html
--- a/content/media/test/mochitest.ini
+++ b/content/media/test/mochitest.ini
@@ -363,16 +363,19 @@ skip-if = (buildapp == 'b2g' && (toolkit
 [test_new_audio.html]
 [test_paused.html]
 [test_paused_after_ended.html]
 [test_play_events.html]
 skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(Last event should be canplaythrough for gizmo.mp4 - got playing, expected canplaythrough) b2g-desktop(Last event should be canplaythrough for gizmo.mp4 - got playing, expected canplaythrough)
 [test_play_events_2.html]
 skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(Last event should be canplaythrough for gizmo.mp4 - got playing, expected canplaythrough) b2g-desktop(Last event should be canplaythrough for gizmo.mp4 - got playing, expected canplaythrough)
 [test_playback_errors.html]
+[test_playback_rate.html]
+# Win: Bug 814533, B2G & Android Debug: Bug 1020538
+skip-if = os == 'win' || buildapp == 'b2g' || (toolkit == 'android' && debug)
 [test_seekable1.html]
 skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug))
 [test_preload_actions.html]
 [test_preload_attribute.html]
 [test_progress.html]
 skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(bug 901716 - timeouts) b2g-desktop(bug 901716 - timeouts)
 [test_reactivate.html]
 skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(timed out in small-shot.mp3) b2g-desktop(timed out in small-shot.mp3)
@@ -452,26 +455,16 @@ skip-if = buildapp == 'b2g'
 # [test_error_in_video_document.html] # disabled - See bug 608634
 # [test_mixed_principals.html] # disabled - See bug 567954 and 574586
 # [test_playback_rate_playpause.html] # disabled - See bug 897108
 # [test_played.html] # disabled - See bug 751539
 # [test_preload_suspend.html] # disabled - See bug 493692
 # [test_resume.html] # disabled - No bug :-(
 # [test_videoDocumentTitle.html] # disabled - See bug 492821
 
-# [test_playback_rate.html] # disabled - See bug 921622
-# Disabled since it causes random memory corruption, bug 921622, so
-# the best-case scenario is that it results in random crashes while it
-# runs, like bug 918417, bug 920827, bug 923996, bug 928225, bug 929521
-# bug 930982, bug 932193. Worst-case but quite likely, it causes random
-# crashes and failures in other tests which run after it. Don't even think
-# about reenabling it on any platform unless you *know* that you have fixed
-# that. Then don't think about reenabling it on Windows until you know that
-# you have fixed the timeouts of bug 832768, bug 814533, bug 840742
-
 [test_play_twice.html]
 # Seamonkey: Bug 598252, B2G: Bug 982100, Android: Bug 758476, bug 981086
 skip-if = appname == "seamonkey" || toolkit == 'gonk' || toolkit == 'android'
 
 [test_buffered.html]
 skip-if = toolkit == 'android' || os == "win" || (toolkit == 'gonk' && !debug) # See bug 832768 and 864682, b2g(assertion failures)
 [test_bug465498.html]
 skip-if = os == "win" || (toolkit == 'gonk' && !debug) # See bug 832768 and 864682
--- a/content/media/test/test_playback_rate.html
+++ b/content/media/test/test_playback_rate.html
@@ -5,22 +5,29 @@
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   <script type="text/javascript" src="manifest.js"></script>
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type='application/javascript;version=1.8'>
 
-SimpleTest.expectAssertions(0, 2);
-
+// In varying quantities:
+// ASSERTION: Should be on state machine or decode thread.:
+//            'OnStateMachineThread() || OnDecodeThread()',
+//            file MediaDecoderStateMachine.cpp, line 559
+// ASSERTION: Clock should go forwards if the playback rate is > 0.:
+//            'mCurrentFrameTime <= clock_time || mPlaybackRate <= 0',
+//            file MediaDecoderStateMachine.cpp, line 2379
+// This test is currently disabled on Android debug for wildly-varying numbers of the above.
+SimpleTest.expectAssertions(5, 9);
 if (navigator.platform.startsWith("Win")) {
-  SimpleTest.expectAssertions(0, 1);
+  SimpleTest.expectAssertions(4, 5);
 } else if (navigator.platform.startsWith("Mac")) {
-  SimpleTest.expectAssertions(0, 2);
+  SimpleTest.expectAssertions(5, 7);
 }
 
 let manager = new MediaTestManager;
 
 function rangeCheck(lhs, rhs, threshold) {
   var diff = Math.abs(lhs - rhs);
   if (diff < threshold) {
     return true;