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

Unified Diff: third_party/WebKit/Source/core/dom/MainThreadTaskRunnerTest.cpp

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/dom/MainThreadTaskRunnerTest.cpp
diff --git a/third_party/WebKit/Source/core/dom/MainThreadTaskRunnerTest.cpp b/third_party/WebKit/Source/core/dom/MainThreadTaskRunnerTest.cpp
index 1651ef4f30519affb4857a0195df50042bc5d63b..13f521439cc7740314e8e0be632eca872f0b7883 100644
--- a/third_party/WebKit/Source/core/dom/MainThreadTaskRunnerTest.cpp
+++ b/third_party/WebKit/Source/core/dom/MainThreadTaskRunnerTest.cpp
@@ -33,7 +33,8 @@
#include "platform/testing/UnitTestHelpers.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "wtf/Forward.h"
-#include <memory>
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
namespace blink {
@@ -45,7 +46,7 @@ static void markBoolean(bool* toBeMarked)
TEST(MainThreadTaskRunnerTest, PostTask)
{
NullExecutionContext* context = new NullExecutionContext();
- std::unique_ptr<MainThreadTaskRunner> runner = MainThreadTaskRunner::create(context);
+ OwnPtr<MainThreadTaskRunner> runner = MainThreadTaskRunner::create(context);
bool isMarked = false;
runner->postTask(BLINK_FROM_HERE, createSameThreadTask(&markBoolean, &isMarked));
@@ -57,7 +58,7 @@ TEST(MainThreadTaskRunnerTest, PostTask)
TEST(MainThreadTaskRunnerTest, SuspendTask)
{
NullExecutionContext* context = new NullExecutionContext();
- std::unique_ptr<MainThreadTaskRunner> runner = MainThreadTaskRunner::create(context);
+ OwnPtr<MainThreadTaskRunner> runner = MainThreadTaskRunner::create(context);
bool isMarked = false;
context->setTasksNeedSuspension(true);
@@ -75,7 +76,7 @@ TEST(MainThreadTaskRunnerTest, SuspendTask)
TEST(MainThreadTaskRunnerTest, RemoveRunner)
{
NullExecutionContext* context = new NullExecutionContext();
- std::unique_ptr<MainThreadTaskRunner> runner = MainThreadTaskRunner::create(context);
+ OwnPtr<MainThreadTaskRunner> runner = MainThreadTaskRunner::create(context);
bool isMarked = false;
context->setTasksNeedSuspension(true);
« no previous file with comments | « third_party/WebKit/Source/core/dom/MainThreadTaskRunner.h ('k') | third_party/WebKit/Source/core/dom/MessagePort.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698