| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/paint/NinePieceImageGrid.h" | 5 #include "core/paint/NinePieceImageGrid.h" |
| 6 | 6 |
| 7 #include "core/css/CSSGradientValue.h" | 7 #include "core/css/CSSGradientValue.h" |
| 8 #include "core/layout/LayoutTestHelper.h" | 8 #include "core/layout/LayoutTestHelper.h" |
| 9 #include "core/style/ComputedStyle.h" | 9 #include "core/style/ComputedStyle.h" |
| 10 #include "core/style/NinePieceImage.h" | 10 #include "core/style/NinePieceImage.h" |
| 11 #include "core/style/StyleGeneratedImage.h" | 11 #include "core/style/StyleGeneratedImage.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 class NinePieceImageGridTest : public RenderingTest { | 17 class NinePieceImageGridTest : public RenderingTest { |
| 18 public: | 18 public: |
| 19 NinePieceImageGridTest() { } | 19 NinePieceImageGridTest() { } |
| 20 | 20 |
| 21 PassRefPtrWillBeRawPtr<StyleImage> generatedImage() | 21 RawPtr<StyleImage> generatedImage() |
| 22 { | 22 { |
| 23 RefPtrWillBeRawPtr<CSSLinearGradientValue> gradient = CSSLinearGradientV
alue::create(Repeating); | 23 RawPtr<CSSLinearGradientValue> gradient = CSSLinearGradientValue::create
(Repeating); |
| 24 return StyleGeneratedImage::create(*gradient); | 24 return StyleGeneratedImage::create(*gradient); |
| 25 } | 25 } |
| 26 | 26 |
| 27 private: | 27 private: |
| 28 void SetUp() override | 28 void SetUp() override |
| 29 { | 29 { |
| 30 RenderingTest::SetUp(); | 30 RenderingTest::SetUp(); |
| 31 } | 31 } |
| 32 }; | 32 }; |
| 33 | 33 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 EXPECT_FLOAT_EQ(testCase.pieces[piece].tileScaleHorizontal, drawInfo
.tileScale.width()); | 259 EXPECT_FLOAT_EQ(testCase.pieces[piece].tileScaleHorizontal, drawInfo
.tileScale.width()); |
| 260 EXPECT_FLOAT_EQ(testCase.pieces[piece].tileScaleVertical, drawInfo.t
ileScale.height()); | 260 EXPECT_FLOAT_EQ(testCase.pieces[piece].tileScaleVertical, drawInfo.t
ileScale.height()); |
| 261 EXPECT_EQ(testCase.pieces[piece].horizontalRule, drawInfo.tileRule.h
orizontal); | 261 EXPECT_EQ(testCase.pieces[piece].horizontalRule, drawInfo.tileRule.h
orizontal); |
| 262 EXPECT_EQ(testCase.pieces[piece].verticalRule, drawInfo.tileRule.ver
tical); | 262 EXPECT_EQ(testCase.pieces[piece].verticalRule, drawInfo.tileRule.ver
tical); |
| 263 } | 263 } |
| 264 } | 264 } |
| 265 } | 265 } |
| 266 | 266 |
| 267 } // namespace | 267 } // namespace |
| 268 } // namespace blink | 268 } // namespace blink |
| OLD | NEW |