| 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 namespace blink { |
| 11 | |
| 12 namespace { | |
| 13 | 11 |
| 14 // Once we setWholeSubtreeInvalid, we should not keep the HashSets. | 12 // Once we setWholeSubtreeInvalid, we should not keep the HashSets. |
| 15 TEST(DescendantInvalidationSetTest, SubtreeInvalid_AddBefore) | 13 TEST(DescendantInvalidationSetTest, SubtreeInvalid_AddBefore) |
| 16 { | 14 { |
| 17 RefPtrWillBeRawPtr<DescendantInvalidationSet> set = DescendantInvalidationSe
t::create(); | 15 RefPtrWillBeRawPtr<DescendantInvalidationSet> set = DescendantInvalidationSe
t::create(); |
| 18 set->addClass("a"); | 16 set->addClass("a"); |
| 19 set->setWholeSubtreeInvalid(); | 17 set->setWholeSubtreeInvalid(); |
| 20 | 18 |
| 21 ASSERT_TRUE(set->isEmpty()); | 19 ASSERT_TRUE(set->isEmpty()); |
| 22 } | 20 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 } | 70 } |
| 73 | 71 |
| 74 #ifndef NDEBUG | 72 #ifndef NDEBUG |
| 75 TEST(DescendantInvalidationSetTest, ShowDebug) | 73 TEST(DescendantInvalidationSetTest, ShowDebug) |
| 76 { | 74 { |
| 77 RefPtrWillBeRawPtr<DescendantInvalidationSet> set = DescendantInvalidationSe
t::create(); | 75 RefPtrWillBeRawPtr<DescendantInvalidationSet> set = DescendantInvalidationSe
t::create(); |
| 78 set->show(); | 76 set->show(); |
| 79 } | 77 } |
| 80 #endif // NDEBUG | 78 #endif // NDEBUG |
| 81 | 79 |
| 82 } // namespace | 80 } // namespace blink |
| OLD | NEW |