Chromium Code Reviews| 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..b4516c15db83cf4bcb6f4decd8a14966a4864b35 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,16 @@ 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().GetPage()->MainFrame()); |
| + EXPECT_TRUE(local_frame->GetDocument()->IsSVGDocument()); |
| + LayoutObject* svg_root = local_frame->View()->GetLayoutView()->ChildAt(0); |
|
fs
2017/05/17 11:14:45
Nit: s/ChildAt(0)/FirstChild/ (ChildAt is quite th
chrishtr
2017/05/17 17:01:18
Done.
|
| + EXPECT_TRUE(svg_root->IsSVGRoot()); |
| + EXPECT_TRUE( |
| + ToLayoutBoxModelObject(svg_root)->Layer()->SupportsSubsequenceCaching()); |
| +} |
| + |
| } // namespace blink |