#652 ✓ staged
Scott Downe

code plugin tests fail because of a timing issue

Reported by Scott Downe | July 18th, 2011 @ 01:53 PM | in 0.8 (closed)

code plugin has a test that looks like this:

  popped.code({
    start: 4,
    end: 6,
    onStart: function( options ) {
      codeDiv.innerHTML = 'Test 3 - onStart [Frames: ';
      ok(true, 'Test 3 onStart was run.');
      plus();
    },
    onFrame: function ( options ) {
      codeDiv.innerHTML += '.';
      frames++;
    },
    onEnd: function ( options ) {
      codeDiv.innerHTML += '] Test 3 - onEnd';
      ok(true, 'Test 3 onEnd was run.');
      plus();
      ok(frames > 100, 'Test 3 onFrames was run.');
      plus();
      popped.pause();
    }
  });

onFrame is counting the number of calls, then on onEnd, it checks to see if it is greater than 100. Right now, I'm having it fail because frames is anywhere form 30 to 60. Should only test that frames is greater than 1.

Comments and changes to this ticket

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

Pages