OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "web/PageOverlay.h" | 5 #include "web/PageOverlay.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
8 #include "platform/graphics/Color.h" | 9 #include "platform/graphics/Color.h" |
9 #include "platform/graphics/GraphicsContext.h" | 10 #include "platform/graphics/GraphicsContext.h" |
10 #include "platform/graphics/paint/DrawingRecorder.h" | 11 #include "platform/graphics/paint/DrawingRecorder.h" |
11 #include "platform/graphics/paint/PaintController.h" | 12 #include "platform/graphics/paint/PaintController.h" |
12 #include "public/platform/Platform.h" | 13 #include "public/platform/Platform.h" |
13 #include "public/platform/WebCanvas.h" | 14 #include "public/platform/WebCanvas.h" |
14 #include "public/platform/WebThread.h" | 15 #include "public/platform/WebThread.h" |
15 #include "public/web/WebSettings.h" | 16 #include "public/web/WebSettings.h" |
16 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "third_party/skia/include/core/SkBitmap.h" | 19 #include "third_party/skia/include/core/SkBitmap.h" |
19 #include "third_party/skia/include/core/SkCanvas.h" | 20 #include "third_party/skia/include/core/SkCanvas.h" |
20 #include "third_party/skia/include/core/SkColor.h" | 21 #include "third_party/skia/include/core/SkColor.h" |
21 #include "third_party/skia/include/core/SkPaint.h" | 22 #include "third_party/skia/include/core/SkPaint.h" |
22 #include "web/WebLocalFrameImpl.h" | 23 #include "web/WebLocalFrameImpl.h" |
23 #include "web/WebViewImpl.h" | 24 #include "web/WebViewImpl.h" |
24 #include "web/tests/FrameTestHelpers.h" | 25 #include "web/tests/FrameTestHelpers.h" |
25 #include <memory> | |
26 | 26 |
27 using testing::_; | 27 using testing::_; |
28 using testing::AtLeast; | 28 using testing::AtLeast; |
29 using testing::Property; | 29 using testing::Property; |
30 | 30 |
31 namespace blink { | 31 namespace blink { |
32 namespace { | 32 namespace { |
33 | 33 |
34 static const int viewportWidth = 800; | 34 static const int viewportWidth = 800; |
35 static const int viewportHeight = 600; | 35 static const int viewportHeight = 600; |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 initialize(AcceleratedCompositing); | 153 initialize(AcceleratedCompositing); |
154 std::unique_ptr<PageOverlay> pageOverlay = createSolidYellowOverlay(); | 154 std::unique_ptr<PageOverlay> pageOverlay = createSolidYellowOverlay(); |
155 pageOverlay->update(); | 155 pageOverlay->update(); |
156 webViewImpl()->updateAllLifecyclePhases(); | 156 webViewImpl()->updateAllLifecyclePhases(); |
157 EXPECT_EQ(LayoutRect(0, 0, viewportWidth, viewportHeight), | 157 EXPECT_EQ(LayoutRect(0, 0, viewportWidth, viewportHeight), |
158 pageOverlay->visualRect()); | 158 pageOverlay->visualRect()); |
159 } | 159 } |
160 | 160 |
161 } // namespace | 161 } // namespace |
162 } // namespace blink | 162 } // namespace blink |
OLD | NEW |