Bug 23168 - Improve DRT API existence test in animation-test-helpers.js & transition-test-helpers.js
Summary: Improve DRT API existence test in animation-test-helpers.js & transition-test...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Pierre-Olivier Latour
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-07 11:34 PST by Simon Fraser (smfr)
Modified: 2015-08-12 06:14 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2009-01-07 11:34:38 PST
animation-test-helper.js has this:

var hasPauseAnimationAPI = window.layoutTestController && layoutTestController.pauseAnimationAtTimeOnElementWithId;

That expression does not evaluate to boolean; hasPauseAnimationAPI is 'undefined' if the API is not present.

A better form is:

 var hasPauseAnimationAPI = ('layoutTestController' in window) && ('pauseAnimationAtTimeOnElementWithId' in layoutTestController);
Comment 1 Pierre-Olivier Latour 2009-01-07 13:42:56 PST
Same issue in transition-test-helpers.js
Comment 2 Pierre-Olivier Latour 2009-01-07 14:57:15 PST
Sending        LayoutTests/ChangeLog
Sending        LayoutTests/animations/animation-test-helpers.js
Sending        LayoutTests/transitions/transition-test-helpers.js
Transmitting file data ...
Committed revision 39687.