Index: third_party/WebKit/Source/core/svg/graphics/SVGImageTest.cpp |
diff --git a/third_party/WebKit/Source/core/svg/graphics/SVGImageTest.cpp b/third_party/WebKit/Source/core/svg/graphics/SVGImageTest.cpp |
index 9c71221fac1a3d5aa5bb0af66424176cce78fdb3..900a5747676d225f9b6190a939c8b8eb3cac9808 100644 |
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImageTest.cpp |
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImageTest.cpp |
@@ -4,6 +4,9 @@ |
#include "core/svg/graphics/SVGImage.h" |
+#include "core/frame/FrameView.h" |
+#include "core/layout/LayoutView.h" |
+#include "core/paint/PaintLayer.h" |
#include "core/svg/graphics/SVGImageChromeClient.h" |
#include "platform/SharedBuffer.h" |
#include "platform/Timer.h" |
@@ -145,4 +148,17 @@ TEST_F(SVGImageTest, ResetAnimation) { |
EXPECT_TRUE(timer->IsActive()); |
} |
+TEST_F(SVGImageTest, SupportsSubsequenceCaching) { |
+ const bool kShouldPause = true; |
+ Load(kAnimatedDocument, kShouldPause); |
+ PumpFrame(); |
+ LocalFrame* local_frame = |
+ ToLocalFrame(GetImage().GetPageForTesting()->MainFrame()); |
+ EXPECT_TRUE(local_frame->GetDocument()->IsSVGDocument()); |
+ LayoutObject* svg_root = local_frame->View()->GetLayoutView()->FirstChild(); |
+ EXPECT_TRUE(svg_root->IsSVGRoot()); |
+ EXPECT_TRUE( |
+ ToLayoutBoxModelObject(svg_root)->Layer()->SupportsSubsequenceCaching()); |
+} |
+ |
} // namespace blink |