| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/paint/NinePieceImageGrid.h" | 6 #include "core/paint/NinePieceImageGrid.h" |
| 7 | 7 |
| 8 #include "core/css/CSSGradientValue.h" | 8 #include "core/css/CSSGradientValue.h" |
| 9 #include "core/layout/LayoutTestHelper.h" | 9 #include "core/layout/LayoutTestHelper.h" |
| 10 #include "core/style/ComputedStyle.h" | 10 #include "core/style/ComputedStyle.h" |
| 11 #include "core/style/NinePieceImage.h" | 11 #include "core/style/NinePieceImage.h" |
| 12 #include "core/style/StyleGeneratedImage.h" | 12 #include "core/style/StyleGeneratedImage.h" |
| 13 #include <gtest/gtest.h> | 13 #include <gtest/gtest.h> |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 class NinePieceImageGridTest : public RenderingTest { | 18 class NinePieceImageGridTest : public RenderingTest { |
| 19 public: | 19 public: |
| 20 NinePieceImageGridTest() { } | 20 NinePieceImageGridTest() { } |
| 21 | 21 |
| 22 PassRefPtrWillBeRawPtr<StyleImage> generatedImage() | 22 PassRefPtrWillBeRawPtr<StyleImage> generatedImage() |
| 23 { | 23 { |
| 24 RefPtrWillBeRawPtr<CSSLinearGradientValue> gradient = CSSLinearGradientV
alue::create(Repeating); | 24 RefPtr<CSSLinearGradientValue> gradient = CSSLinearGradientValue::create
(Repeating); |
| 25 return StyleGeneratedImage::create(gradient.get()); | 25 return StyleGeneratedImage::create(gradient.get()); |
| 26 } | 26 } |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 void SetUp() override | 29 void SetUp() override |
| 30 { | 30 { |
| 31 RenderingTest::SetUp(); | 31 RenderingTest::SetUp(); |
| 32 } | 32 } |
| 33 }; | 33 }; |
| 34 | 34 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 EXPECT_FLOAT_EQ(testCase.pieces[piece].tileScaleHorizontal, drawInfo
.tileScale.width()); | 260 EXPECT_FLOAT_EQ(testCase.pieces[piece].tileScaleHorizontal, drawInfo
.tileScale.width()); |
| 261 EXPECT_FLOAT_EQ(testCase.pieces[piece].tileScaleVertical, drawInfo.t
ileScale.height()); | 261 EXPECT_FLOAT_EQ(testCase.pieces[piece].tileScaleVertical, drawInfo.t
ileScale.height()); |
| 262 EXPECT_EQ(testCase.pieces[piece].horizontalRule, drawInfo.tileRule.h
orizontal); | 262 EXPECT_EQ(testCase.pieces[piece].horizontalRule, drawInfo.tileRule.h
orizontal); |
| 263 EXPECT_EQ(testCase.pieces[piece].verticalRule, drawInfo.tileRule.ver
tical); | 263 EXPECT_EQ(testCase.pieces[piece].verticalRule, drawInfo.tileRule.ver
tical); |
| 264 } | 264 } |
| 265 } | 265 } |
| 266 } | 266 } |
| 267 | 267 |
| 268 } // namespace | 268 } // namespace |
| 269 } // namespace blink | 269 } // namespace blink |
| OLD | NEW |