Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(764)

Unified Diff: third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp

Issue 2810423003: Schedule bitmap animation timers on the compositor task runner. (Closed)
Patch Set: fix up comment about a method changed by blink reformat Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp b/third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp
index 493d5d77616cb58efb3800e06ed5c6ab6e676190..ce94c7f67980b6d2787948107722009333fe2fa8 100644
--- a/third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp
@@ -34,6 +34,7 @@
#include "platform/graphics/BitmapImageMetrics.h"
#include "platform/graphics/DeferredImageDecoder.h"
#include "platform/graphics/ImageObserver.h"
+#include "platform/scheduler/test/fake_web_task_runner.h"
#include "platform/testing/HistogramTester.h"
#include "platform/testing/UnitTestHelpers.h"
#include "platform/wtf/StdLibExtras.h"
@@ -134,11 +135,13 @@ class BitmapImageTest : public ::testing::Test {
protected:
void SetUp() override {
image_observer_ = new FakeImageObserver;
- image_ = BitmapImage::Create(image_observer_.Get());
+ image_ = BitmapImage::Create(task_runner_, image_observer_.Get());
+ task_runner_ = AdoptRef(new scheduler::FakeWebTaskRunner);
}
Persistent<FakeImageObserver> image_observer_;
RefPtr<BitmapImage> image_;
+ RefPtr<scheduler::FakeWebTaskRunner> task_runner_;
};
TEST_F(BitmapImageTest, destroyDecodedData) {
@@ -179,7 +182,8 @@ TEST_F(BitmapImageTest, isAllDataReceived) {
ReadFile("/LayoutTests/images/resources/green.jpg");
ASSERT_TRUE(image_data.Get());
- RefPtr<BitmapImage> image = BitmapImage::Create();
+ RefPtr<BitmapImage> image =
+ BitmapImage::Create(BitmapImageTest::task_runner_);
EXPECT_FALSE(image->IsAllDataReceived());
image->SetData(image_data, false);

Powered by Google App Engine
This is Rietveld 408576698