Index: third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreatorTest.cpp |
diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreatorTest.cpp b/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreatorTest.cpp |
index 81cec46726049147ccb1d763e99045f809b31b2f..2d73306e615a904163b2204215a542d2fbee9802 100644 |
--- a/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreatorTest.cpp |
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreatorTest.cpp |
@@ -21,8 +21,14 @@ class MockCanvasAsyncBlobCreator : public CanvasAsyncBlobCreator { |
MockCanvasAsyncBlobCreator(DOMUint8ClampedArray* data, |
const IntSize& size, |
MimeType mimeType, |
- Document& document) |
- : CanvasAsyncBlobCreator(data, mimeType, size, nullptr, 0, document) {} |
+ Document* document) |
+ : CanvasAsyncBlobCreator(data, |
+ mimeType, |
+ size, |
+ nullptr, |
+ 0, |
+ document, |
+ nullptr) {} |
CanvasAsyncBlobCreator::IdleTaskStatus idleTaskStatus() { |
return m_idleTaskStatus; |
@@ -62,7 +68,7 @@ class MockCanvasAsyncBlobCreatorWithoutStartPng |
public: |
MockCanvasAsyncBlobCreatorWithoutStartPng(DOMUint8ClampedArray* data, |
const IntSize& size, |
- Document& document) |
+ Document* document) |
: MockCanvasAsyncBlobCreator(data, size, MimeTypePng, document) {} |
protected: |
@@ -79,7 +85,7 @@ class MockCanvasAsyncBlobCreatorWithoutCompletePng |
public: |
MockCanvasAsyncBlobCreatorWithoutCompletePng(DOMUint8ClampedArray* data, |
const IntSize& size, |
- Document& document) |
+ Document* document) |
: MockCanvasAsyncBlobCreator(data, size, MimeTypePng, document) {} |
protected: |
@@ -106,7 +112,7 @@ class MockCanvasAsyncBlobCreatorWithoutStartJpeg |
public: |
MockCanvasAsyncBlobCreatorWithoutStartJpeg(DOMUint8ClampedArray* data, |
const IntSize& size, |
- Document& document) |
+ Document* document) |
: MockCanvasAsyncBlobCreator(data, size, MimeTypeJpeg, document) {} |
protected: |
@@ -123,7 +129,7 @@ class MockCanvasAsyncBlobCreatorWithoutCompleteJpeg |
public: |
MockCanvasAsyncBlobCreatorWithoutCompleteJpeg(DOMUint8ClampedArray* data, |
const IntSize& size, |
- Document& document) |
+ Document* document) |
: MockCanvasAsyncBlobCreator(data, size, MimeTypeJpeg, document) {} |
protected: |
@@ -180,7 +186,7 @@ void CanvasAsyncBlobCreatorTest:: |
ImageData* imageData = ImageData::create(testSize); |
m_asyncBlobCreator = new MockCanvasAsyncBlobCreatorWithoutStartPng( |
- imageData->data(), testSize, document()); |
+ imageData->data(), testSize, &document()); |
} |
void CanvasAsyncBlobCreatorTest:: |
@@ -189,7 +195,7 @@ void CanvasAsyncBlobCreatorTest:: |
ImageData* imageData = ImageData::create(testSize); |
m_asyncBlobCreator = new MockCanvasAsyncBlobCreatorWithoutCompletePng( |
- imageData->data(), testSize, document()); |
+ imageData->data(), testSize, &document()); |
} |
void CanvasAsyncBlobCreatorTest::prepareMockCanvasAsyncBlobCreatorFailPng() { |
@@ -200,7 +206,7 @@ void CanvasAsyncBlobCreatorTest::prepareMockCanvasAsyncBlobCreatorFailPng() { |
// this test case is expected to fail at initialization step before |
// completion. |
m_asyncBlobCreator = new MockCanvasAsyncBlobCreatorWithoutCompletePng( |
- imageData->data(), testSize, document()); |
+ imageData->data(), testSize, &document()); |
} |
void CanvasAsyncBlobCreatorTest:: |
@@ -209,7 +215,7 @@ void CanvasAsyncBlobCreatorTest:: |
ImageData* imageData = ImageData::create(testSize); |
m_asyncBlobCreator = new MockCanvasAsyncBlobCreatorWithoutStartJpeg( |
- imageData->data(), testSize, document()); |
+ imageData->data(), testSize, &document()); |
} |
void CanvasAsyncBlobCreatorTest:: |
@@ -218,7 +224,7 @@ void CanvasAsyncBlobCreatorTest:: |
ImageData* imageData = ImageData::create(testSize); |
m_asyncBlobCreator = new MockCanvasAsyncBlobCreatorWithoutCompleteJpeg( |
- imageData->data(), testSize, document()); |
+ imageData->data(), testSize, &document()); |
} |
void CanvasAsyncBlobCreatorTest::prepareMockCanvasAsyncBlobCreatorFailJpeg() { |
@@ -229,7 +235,7 @@ void CanvasAsyncBlobCreatorTest::prepareMockCanvasAsyncBlobCreatorFailJpeg() { |
// this test case is expected to fail at initialization step before |
// completion. |
m_asyncBlobCreator = new MockCanvasAsyncBlobCreatorWithoutCompleteJpeg( |
- imageData->data(), testSize, document()); |
+ imageData->data(), testSize, &document()); |
} |
void CanvasAsyncBlobCreatorTest::TearDown() { |
@@ -296,7 +302,7 @@ TEST_F(CanvasAsyncBlobCreatorTest, |
EXPECT_CALL(*(asyncBlobCreator()), |
signalTaskSwitchInStartTimeoutEventForTesting()); |
- this->asyncBlobCreator()->scheduleAsyncBlobCreation(true, 1.0); |
+ this->asyncBlobCreator()->scheduleAsyncBlobCreation(1.0); |
testing::enterRunLoop(); |
::testing::Mock::VerifyAndClearExpectations(asyncBlobCreator()); |
@@ -310,7 +316,7 @@ TEST_F(CanvasAsyncBlobCreatorTest, |
EXPECT_CALL(*(asyncBlobCreator()), |
signalTaskSwitchInCompleteTimeoutEventForTesting()); |
- this->asyncBlobCreator()->scheduleAsyncBlobCreation(true, 1.0); |
+ this->asyncBlobCreator()->scheduleAsyncBlobCreation(1.0); |
testing::enterRunLoop(); |
::testing::Mock::VerifyAndClearExpectations(asyncBlobCreator()); |
@@ -322,7 +328,7 @@ TEST_F(CanvasAsyncBlobCreatorTest, |
JpegIdleTaskFailedWhenStartTimeoutEventHappens) { |
this->prepareMockCanvasAsyncBlobCreatorFailJpeg(); |
- this->asyncBlobCreator()->scheduleAsyncBlobCreation(true, 1.0); |
+ this->asyncBlobCreator()->scheduleAsyncBlobCreation(1.0); |
testing::enterRunLoop(); |
EXPECT_EQ(IdleTaskStatus::IdleTaskFailed, |