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

Unified Diff: third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreatorTest.cpp

Issue 1977773002: Make SameThreadTask/CrossThreadTask internal and remove platform/Task.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Shironeko_3
Patch Set: Rebase. Use DCHECK. Created 4 years, 7 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/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 9fa01566ae476835e8445005c41ed62723296f38..423c670d15256365477b6fa4417b0ec205732354 100644
--- a/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreatorTest.cpp
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreatorTest.cpp
@@ -5,7 +5,6 @@
#include "core/html/canvas/CanvasAsyncBlobCreator.h"
#include "core/html/ImageData.h"
-#include "platform/Task.h"
#include "platform/testing/UnitTestHelpers.h"
#include "public/platform/Platform.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -35,7 +34,7 @@ protected:
void createBlobAndInvokeCallback() override { };
void createNullAndInvokeCallback() override { };
void signalAlternativeCodePathFinishedForTesting() override;
- void postDelayedTaskToMainThread(const WebTraceLocation&, SameThreadTask*, double delayMs) override;
+ void postDelayedTaskToMainThread(const WebTraceLocation&, std::unique_ptr<SameThreadClosure>, double delayMs) override;
};
void MockCanvasAsyncBlobCreator::signalAlternativeCodePathFinishedForTesting()
@@ -43,9 +42,10 @@ void MockCanvasAsyncBlobCreator::signalAlternativeCodePathFinishedForTesting()
testing::exitRunLoop();
}
-void MockCanvasAsyncBlobCreator::postDelayedTaskToMainThread(const WebTraceLocation& location, SameThreadTask* task, double delayMs)
+void MockCanvasAsyncBlobCreator::postDelayedTaskToMainThread(const WebTraceLocation& location, std::unique_ptr<SameThreadClosure> task, double delayMs)
{
- Platform::current()->mainThread()->getWebTaskRunner()->postTask(location, task);
+ DCHECK(isMainThread());
+ Platform::current()->mainThread()->getWebTaskRunner()->postTask(location, std::move(task));
}
//==============================================================================
« no previous file with comments | « third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp ('k') | third_party/WebKit/Source/platform/Task.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698