#441 ✓ resolved
Scott Downe

youtube.unit.js tests need reviewing

Reported by Scott Downe | March 21st, 2011 @ 04:36 PM | in 0.9 (closed)

For starters I am having a hell of a time running them on my crappy network.

Second, it looks like events are defined multiple times. Is this intended? example:

  var expectedEvents = [
    'play',
    'loadeddata',
    'playing',
    'volumechange',
    'pause',
    'play',
    'playing',
    'seeked',
    'volumechange',
    'volumechange',
    'playing',
    'pause',
    'ended'
  ];

Without duplicates, we would be seeing this:

  var expectedEvents = [
    'play',
    'loadeddata',
    'playing',
    'volumechange',
    'pause',
    'seeked',
    'ended'
  ];

I am starting to think this is intended, but if that's the case, is there a better way to test this?

Also, the timeout of stop( 15000 ); is not enough, it always times out for me. We should consider raising this, or removing it.

Vimeo's tests are pretty solid. Has a 20 second timeout. I get the odd timeout, but mostly passes within 20 seconds.

Anyway, I am assigning this to myself, and I will be pestering Steve for help in the near future.

Comments and changes to this ticket

  • Scott Downe

    Scott Downe March 24th, 2011 @ 05:51 PM

    • State changed from “assigned” to “open”
    • Assigned user cleared.
  • Steven W

    Steven W April 13th, 2011 @ 11:19 PM

    Just seeing this now.
    I agree the Youtube tests could use an overhaul, the Vimeo ones could also benefit from a bit more robust test coverage. I've created #471 to try and help standardize test coverage across players.

    My understanding is the duplicates are the expected order for events to be fired in throughout the course of the test.
    CC'ing vvasabi.

  • vvasabi

    vvasabi April 13th, 2011 @ 11:33 PM

    Yes, the YouTube tests are not the best tests in the world and heavily depend on the network conditions in order to pass. The duplication is the result of the test logic requiring the exact events to be fired in sequence.

    For example, if you pause and play, the Youtube wrapper fires pause, play and playing events. If these events are not specified, the test would fail. Also, in the case of seek(), the Youtube player attempts to mimic HTML5 video's behaviour by specifying that:

    1) If video is playing, the video should be playing after seeking.
    2) If video is paused, the video should be paused after seeking.

    Therefore, if you seek the video while the video is paused, seek, play and pause events would be fired.

    The effort in #471 would for sure be helpful in unifying the test method and DRYing out the tests.

    ps. Steven, thanks for CC'ing me on this.

  • Scott Downe

    Scott Downe April 20th, 2011 @ 12:35 PM

    • Milestone changed from 0.5 to 0.6
    • Milestone order changed from “33” to “0”
  • annasob

    annasob May 10th, 2011 @ 04:58 PM

    • Milestone changed from 0.6 to 0.7
    • Milestone order changed from “38” to “0”
  • Scott Downe

    Scott Downe June 2nd, 2011 @ 04:38 PM

    • Assigned user set to “Scott Downe”
  • Scott Downe

    Scott Downe June 2nd, 2011 @ 05:22 PM

    • State changed from “open” to “assigned”
  • Rick

    Rick June 18th, 2011 @ 11:39 AM

    • Milestone changed from 0.7 to 0.8
    • Milestone order changed from “13” to “0”
  • Rick

    Rick August 23rd, 2011 @ 01:41 PM

    • Milestone changed from 0.8 to 0.9
    • Milestone order changed from “12” to “0”
  • Scott Downe

    Scott Downe September 22nd, 2011 @ 03:01 PM

    • State changed from “assigned” to “blocked”

    Blocked on #423.

  • cadecairos

    cadecairos September 27th, 2011 @ 03:20 PM

    The changes in #423 should resolve this ticket.

  • cadecairos

    cadecairos September 28th, 2011 @ 04:23 PM

    • State changed from “blocked” to “resolved”

    resolved by #423

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Popcorn.js is an HTML5 video framework that lets you bring elements of the web into your videos.

Popcorn.js is a project of Web Made Movies, Mozilla's Open Video Lab.

Shared Ticket Bins

Referenced by

Pages