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/style/ComputedStyle.h" | 5 #include "core/style/ComputedStyle.h" |
6 | 6 |
7 #include "core/style/ClipPathOperation.h" | 7 #include "core/style/ClipPathOperation.h" |
8 #include "core/style/ShapeValue.h" | 8 #include "core/style/ShapeValue.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 TEST(ComputedStyleTest, Preserve3dForceStackingContext) { | 71 TEST(ComputedStyleTest, Preserve3dForceStackingContext) { |
72 RefPtr<ComputedStyle> style = ComputedStyle::create(); | 72 RefPtr<ComputedStyle> style = ComputedStyle::create(); |
73 style->setTransformStyle3D(TransformStyle3DPreserve3D); | 73 style->setTransformStyle3D(TransformStyle3DPreserve3D); |
74 style->setOverflowX(EOverflow::kHidden); | 74 style->setOverflowX(EOverflow::kHidden); |
75 style->setOverflowY(EOverflow::kHidden); | 75 style->setOverflowY(EOverflow::kHidden); |
76 style->updateIsStackingContext(false, false); | 76 style->updateIsStackingContext(false, false); |
77 EXPECT_EQ(TransformStyle3DFlat, style->usedTransformStyle3D()); | 77 EXPECT_EQ(TransformStyle3DFlat, style->usedTransformStyle3D()); |
78 EXPECT_TRUE(style->isStackingContext()); | 78 EXPECT_TRUE(style->isStackingContext()); |
79 } | 79 } |
80 | 80 |
| 81 TEST(ComputedStyleTest, FirstPublicPseudoStyle) { |
| 82 RefPtr<ComputedStyle> style = ComputedStyle::create(); |
| 83 style->setHasPseudoStyle(PseudoIdFirstLine); |
| 84 EXPECT_TRUE(style->hasPseudoStyle(PseudoIdFirstLine)); |
| 85 EXPECT_TRUE(style->hasAnyPublicPseudoStyles()); |
| 86 } |
| 87 |
| 88 TEST(ComputedStyleTest, LastPublicPseudoStyle) { |
| 89 RefPtr<ComputedStyle> style = ComputedStyle::create(); |
| 90 style->setHasPseudoStyle(PseudoIdScrollbar); |
| 91 EXPECT_TRUE(style->hasPseudoStyle(PseudoIdScrollbar)); |
| 92 EXPECT_TRUE(style->hasAnyPublicPseudoStyles()); |
| 93 } |
| 94 |
81 } // namespace blink | 95 } // namespace blink |
OLD | NEW |