works in all 3 major browsers

This commit is contained in:
John McLear 2013-02-07 15:50:59 +00:00
parent 52afe86377
commit 8c0fb090eb

View file

@ -98,7 +98,6 @@ describe("timeslider", function(){
}, 6000); }, 6000);
}, revs*timePerRev); }, revs*timePerRev);
}); });
// This test is bad because it expects char length to be static // This test is bad because it expects char length to be static
// A much better way would be get the charCount before sending new chars // A much better way would be get the charCount before sending new chars
it("jumps to a revision given in the url", function(done) { it("jumps to a revision given in the url", function(done) {
@ -117,7 +116,9 @@ describe("timeslider", function(){
timeslider$ = $('#iframe-container iframe')[0].contentWindow.$; timeslider$ = $('#iframe-container iframe')[0].contentWindow.$;
}catch(e){ }catch(e){
} }
return timeslider$('#padcontent').text().length == 230; if(timeslider$){
return timeslider$('#padcontent').text().length == 230;
}
}, 6000).always(function(){ }, 6000).always(function(){
expect( timeslider$('#padcontent').text().length ).to.eql( 230 ); expect( timeslider$('#padcontent').text().length ).to.eql( 230 );
done(); done();