Bug 23168
Summary: | Improve DRT API existence test in animation-test-helpers.js & transition-test-helpers.js | ||
---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> |
Component: | Tools / Tests | Assignee: | Pierre-Olivier Latour <pol> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | darwinmagnaye420 |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Mac | ||
OS: | OS X 10.5 |
Simon Fraser (smfr)
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);
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Pierre-Olivier Latour
Same issue in transition-test-helpers.js
Pierre-Olivier Latour
Sending LayoutTests/ChangeLog
Sending LayoutTests/animations/animation-test-helpers.js
Sending LayoutTests/transitions/transition-test-helpers.js
Transmitting file data ...
Committed revision 39687.