Closed Bug 1154564 Opened 7 years ago Closed 7 years ago

Add the ability to notify timeouts to MediaTestManager

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

Details

Attachments

(1 file)

No description provided.
Assignee: nobody → jwwang
Status: NEW → ASSIGNED
Comment on attachment 8592597 [details] [diff] [review]
1154564_notify_timeouts-v1.patch

Review of attachment 8592597 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/media/test/manifest.js
@@ +925,5 @@
>    }
>  
>    // Registers that the test corresponding to 'token' has been started.
>    // Don't call more than once per token.
> +  this.started = function(token, handler) {

Take an optional handler to notify unfinished tests when the test case times out. This allows the unfinished tests to report details about the timeout.

::: dom/media/test/test_playback.html
@@ +35,5 @@
> +    "ontimeout": function() {
> +      Log(token, "timed out: ended=" + v.seenEnded + ", suspend=" + v.seenSuspend);
> +    }
> +  };
> +  manager.started(token, handler);

Report event status in the handler and remove the usage of flaky setTimeout().
Attachment #8592597 - Flags: review?(cpearce)
Attachment #8592597 - Flags: review?(cpearce) → review+
Thanks for the super fast review!
https://hg.mozilla.org/mozilla-central/rev/0e73400d9c1c
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.