| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "platform/graphics/paint/DrawingDisplayItem.h" | 5 #include "platform/graphics/paint/DrawingDisplayItem.h" |
| 6 | 6 |
| 7 #include "SkTypes.h" | 7 #include "SkTypes.h" |
| 8 #include "platform/graphics/paint/PaintRecorder.h" | 8 #include "platform/graphics/paint/PaintRecorder.h" |
| 9 #include "platform/graphics/skia/SkiaUtils.h" | 9 #include "platform/graphics/skia/SkiaUtils.h" |
| 10 #include "platform/testing/FakeDisplayItemClient.h" | 10 #include "platform/testing/FakeDisplayItemClient.h" |
| 11 #include "public/platform/WebDisplayItemList.h" | 11 #include "public/platform/WebDisplayItemList.h" |
| 12 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 using testing::_; | 18 using ::testing::_; |
| 19 | 19 |
| 20 class DrawingDisplayItemTest : public ::testing::Test { | 20 class DrawingDisplayItemTest : public ::testing::Test { |
| 21 protected: | 21 protected: |
| 22 FakeDisplayItemClient client_; | 22 FakeDisplayItemClient client_; |
| 23 }; | 23 }; |
| 24 | 24 |
| 25 class MockWebDisplayItemList : public WebDisplayItemList { | 25 class MockWebDisplayItemList : public WebDisplayItemList { |
| 26 public: | 26 public: |
| 27 MOCK_METHOD3(AppendDrawingItem, | 27 MOCK_METHOD3(AppendDrawingItem, |
| 28 void(const WebRect& visual_rect, | 28 void(const WebRect& visual_rect, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 WebRect expected_visual_rect = EnclosingIntRect(visual_rect_with_offset); | 60 WebRect expected_visual_rect = EnclosingIntRect(visual_rect_with_offset); |
| 61 MockWebDisplayItemList list2; | 61 MockWebDisplayItemList list2; |
| 62 EXPECT_CALL(list2, | 62 EXPECT_CALL(list2, |
| 63 AppendDrawingItem(expected_visual_rect, _, expected_record_rect)) | 63 AppendDrawingItem(expected_visual_rect, _, expected_record_rect)) |
| 64 .Times(1); | 64 .Times(1); |
| 65 item.AppendToWebDisplayItemList(offset, &list2); | 65 item.AppendToWebDisplayItemList(offset, &list2); |
| 66 } | 66 } |
| 67 | 67 |
| 68 } // namespace | 68 } // namespace |
| 69 } // namespace blink | 69 } // namespace blink |
| OLD | NEW |