| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 EXPECT_TRUE(style->hasAnyPublicPseudoStyles()); | 85 EXPECT_TRUE(style->hasAnyPublicPseudoStyles()); |
| 86 } | 86 } |
| 87 | 87 |
| 88 TEST(ComputedStyleTest, LastPublicPseudoStyle) { | 88 TEST(ComputedStyleTest, LastPublicPseudoStyle) { |
| 89 RefPtr<ComputedStyle> style = ComputedStyle::create(); | 89 RefPtr<ComputedStyle> style = ComputedStyle::create(); |
| 90 style->setHasPseudoStyle(PseudoIdScrollbar); | 90 style->setHasPseudoStyle(PseudoIdScrollbar); |
| 91 EXPECT_TRUE(style->hasPseudoStyle(PseudoIdScrollbar)); | 91 EXPECT_TRUE(style->hasPseudoStyle(PseudoIdScrollbar)); |
| 92 EXPECT_TRUE(style->hasAnyPublicPseudoStyles()); | 92 EXPECT_TRUE(style->hasAnyPublicPseudoStyles()); |
| 93 } | 93 } |
| 94 | 94 |
| 95 TEST(ComputedStyleTest, |
| 96 UpdatePropertySpecificDifferencesRespectsTransformAnimation) { |
| 97 RefPtr<ComputedStyle> style = ComputedStyle::create(); |
| 98 RefPtr<ComputedStyle> other = ComputedStyle::clone(*style); |
| 99 other->setHasCurrentTransformAnimation(); |
| 100 StyleDifference diff; |
| 101 style->updatePropertySpecificDifferences(*other, diff); |
| 102 EXPECT_TRUE(diff.transformChanged()); |
| 103 } |
| 104 |
| 95 } // namespace blink | 105 } // namespace blink |
| OLD | NEW |