| Index: Source/core/testing/Internals.cpp
|
| diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
|
| index 34a34af9dd054a0d727e68bffc30aa274472b138..6d35f70d4f9750daa3a37c1473d9f3c41a2b4c83 100644
|
| --- a/Source/core/testing/Internals.cpp
|
| +++ b/Source/core/testing/Internals.cpp
|
| @@ -512,6 +512,29 @@ void Internals::advanceTimeForImage(Element* image, double deltaTimeInSeconds, E
|
| imageData->advanceTime(deltaTimeInSeconds);
|
| }
|
|
|
| +void Internals::advanceImageAnimation(Element* image, ExceptionState& exceptionState)
|
| +{
|
| + ASSERT(image);
|
| +
|
| + ImageResource* resource = nullptr;
|
| + if (isHTMLImageElement(*image)) {
|
| + resource = toHTMLImageElement(*image).cachedImage();
|
| + } else if (isSVGImageElement(*image)) {
|
| + resource = toSVGImageElement(*image).cachedImage();
|
| + } else {
|
| + exceptionState.throwDOMException(InvalidAccessError, "The element provided is not a image element.");
|
| + return;
|
| + }
|
| +
|
| + if (!resource || !resource->hasImage()) {
|
| + exceptionState.throwDOMException(InvalidAccessError, "The image resource is not available.");
|
| + return;
|
| + }
|
| +
|
| + Image* imageData = resource->image();
|
| + imageData->advanceAnimationForTesting();
|
| +}
|
| +
|
| bool Internals::hasShadowInsertionPoint(const Node* root, ExceptionState& exceptionState) const
|
| {
|
| ASSERT(root);
|
|
|