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 | 6 |
7 #include "core/paint/LayerClipRecorder.h" | 7 #include "core/paint/LayerClipRecorder.h" |
8 #include "core/paint/RenderDrawingRecorder.h" | 8 #include "core/paint/RenderDrawingRecorder.h" |
9 #include "core/rendering/RenderView.h" | 9 #include "core/rendering/RenderView.h" |
10 #include "core/rendering/RenderingTestHelper.h" | 10 #include "core/rendering/RenderingTestHelper.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 RenderView* m_renderView; | 40 RenderView* m_renderView; |
41 }; | 41 }; |
42 | 42 |
43 class TestDisplayItem : public DisplayItem { | 43 class TestDisplayItem : public DisplayItem { |
44 public: | 44 public: |
45 TestDisplayItem(const RenderObject* renderer, Type type) : DisplayItem(rende
rer->displayItemClient(), type) { } | 45 TestDisplayItem(const RenderObject* renderer, Type type) : DisplayItem(rende
rer->displayItemClient(), type) { } |
46 | 46 |
47 virtual void replay(GraphicsContext*) override final { ASSERT_NOT_REACHED();
} | 47 virtual void replay(GraphicsContext*) override final { ASSERT_NOT_REACHED();
} |
48 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override
final { ASSERT_NOT_REACHED(); } | 48 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override
final { ASSERT_NOT_REACHED(); } |
| 49 #ifndef NDEBUG |
| 50 virtual const char* name() const override final { return "Test"; } |
| 51 #endif |
49 }; | 52 }; |
50 | 53 |
51 #define EXPECT_DISPLAY_LIST(actual, expectedSize, ...) { \ | 54 #define EXPECT_DISPLAY_LIST(actual, expectedSize, ...) { \ |
52 EXPECT_EQ((size_t)expectedSize, actual.size()); \ | 55 EXPECT_EQ((size_t)expectedSize, actual.size()); \ |
53 const TestDisplayItem expected[] = { __VA_ARGS__ }; \ | 56 const TestDisplayItem expected[] = { __VA_ARGS__ }; \ |
54 for (size_t index = 0; index < expectedSize; index++) { \ | 57 for (size_t index = 0; index < expectedSize; index++) { \ |
55 EXPECT_EQ(expected[index].client(), actual[index]->client()); \ | 58 EXPECT_EQ(expected[index].client(), actual[index]->client()); \ |
56 EXPECT_EQ(expected[index].type(), actual[index]->type()); \ | 59 EXPECT_EQ(expected[index].type(), actual[index]->type()); \ |
57 } \ | 60 } \ |
58 } | 61 } |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 EXPECT_TRUE(rootDisplayItemList().clientCacheIsValid(firstRenderer->displayI
temClient())); | 440 EXPECT_TRUE(rootDisplayItemList().clientCacheIsValid(firstRenderer->displayI
temClient())); |
438 EXPECT_TRUE(rootDisplayItemList().clientCacheIsValid(secondRenderer->display
ItemClient())); | 441 EXPECT_TRUE(rootDisplayItemList().clientCacheIsValid(secondRenderer->display
ItemClient())); |
439 | 442 |
440 rootDisplayItemList().invalidateAll(); | 443 rootDisplayItemList().invalidateAll(); |
441 EXPECT_FALSE(rootDisplayItemList().clientCacheIsValid(firstRenderer->display
ItemClient())); | 444 EXPECT_FALSE(rootDisplayItemList().clientCacheIsValid(firstRenderer->display
ItemClient())); |
442 EXPECT_FALSE(rootDisplayItemList().clientCacheIsValid(secondRenderer->displa
yItemClient())); | 445 EXPECT_FALSE(rootDisplayItemList().clientCacheIsValid(secondRenderer->displa
yItemClient())); |
443 } | 446 } |
444 | 447 |
445 } // anonymous namespace | 448 } // anonymous namespace |
446 } // namespace blink | 449 } // namespace blink |
OLD | NEW |