| 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 "core/layout/ImageQualityController.h" | 5 #include "core/layout/ImageQualityController.h" |
| 6 | 6 |
| 7 #include <memory> |
| 7 #include "core/layout/LayoutImage.h" | 8 #include "core/layout/LayoutImage.h" |
| 8 #include "core/layout/LayoutTestHelper.h" | 9 #include "core/layout/LayoutTestHelper.h" |
| 9 #include "platform/graphics/GraphicsContext.h" | 10 #include "platform/graphics/GraphicsContext.h" |
| 10 #include "platform/graphics/paint/PaintController.h" | 11 #include "platform/graphics/paint/PaintController.h" |
| 11 #include "platform/scheduler/test/fake_web_task_runner.h" | 12 #include "platform/scheduler/test/fake_web_task_runner.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include "wtf/PtrUtil.h" | 14 #include "wtf/PtrUtil.h" |
| 14 #include <memory> | |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 class ImageQualityControllerTest : public RenderingTest { | 18 class ImageQualityControllerTest : public RenderingTest { |
| 19 protected: | 19 protected: |
| 20 ImageQualityController* controller() { return m_controller; } | 20 ImageQualityController* controller() { return m_controller; } |
| 21 | 21 |
| 22 private: | 22 private: |
| 23 void SetUp() override { | 23 void SetUp() override { |
| 24 m_controller = ImageQualityController::imageQualityController(); | 24 m_controller = ImageQualityController::imageQualityController(); |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 *img, testImage.get(), testImage.get(), LayoutSize(4, 4), | 347 *img, testImage.get(), testImage.get(), LayoutSize(4, 4), |
| 348 nextTime)); | 348 nextTime)); |
| 349 // Now the timer has restarted, leading to a larger fire interval. | 349 // Now the timer has restarted, leading to a larger fire interval. |
| 350 EXPECT_EQ(ImageQualityController::cLowQualityTimeThreshold, | 350 EXPECT_EQ(ImageQualityController::cLowQualityTimeThreshold, |
| 351 mockTimer->nextFireInterval()); | 351 mockTimer->nextFireInterval()); |
| 352 } | 352 } |
| 353 | 353 |
| 354 #endif | 354 #endif |
| 355 | 355 |
| 356 } // namespace blink | 356 } // namespace blink |
| OLD | NEW |