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/css/invalidation/DescendantInvalidationSet.h" | 6 #include "core/css/invalidation/DescendantInvalidationSet.h" |
7 | 7 |
8 #include <gtest/gtest.h> | 8 #include <gtest/gtest.h> |
9 | 9 |
10 using namespace blink; | 10 using namespace blink; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 set1->setWholeSubtreeInvalid(); | 55 set1->setWholeSubtreeInvalid(); |
56 set2->addAttribute("a"); | 56 set2->addAttribute("a"); |
57 | 57 |
58 set1->combine(*set2); | 58 set1->combine(*set2); |
59 | 59 |
60 ASSERT_TRUE(set1->wholeSubtreeInvalid()); | 60 ASSERT_TRUE(set1->wholeSubtreeInvalid()); |
61 ASSERT_TRUE(set1->isEmpty()); | 61 ASSERT_TRUE(set1->isEmpty()); |
62 } | 62 } |
63 | 63 |
| 64 TEST(DescendantInvalidationSetTest, SubtreeInvalid_AddCustomPseudoBefore) |
| 65 { |
| 66 RefPtrWillBeRawPtr<DescendantInvalidationSet> set = DescendantInvalidationSe
t::create(); |
| 67 set->setCustomPseudoInvalid(); |
| 68 ASSERT_FALSE(set->isEmpty()); |
| 69 |
| 70 set->setWholeSubtreeInvalid(); |
| 71 ASSERT_TRUE(set->isEmpty()); |
| 72 } |
| 73 |
64 #ifndef NDEBUG | 74 #ifndef NDEBUG |
65 TEST(DescendantInvalidationSetTest, ShowDebug) | 75 TEST(DescendantInvalidationSetTest, ShowDebug) |
66 { | 76 { |
67 RefPtrWillBeRawPtr<DescendantInvalidationSet> set = DescendantInvalidationSe
t::create(); | 77 RefPtrWillBeRawPtr<DescendantInvalidationSet> set = DescendantInvalidationSe
t::create(); |
68 set->show(); | 78 set->show(); |
69 } | 79 } |
70 #endif // NDEBUG | 80 #endif // NDEBUG |
71 | 81 |
72 } // namespace | 82 } // namespace |
OLD | NEW |