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

Unified Diff: third_party/WebKit/Source/platform/threading/BackgroundTaskRunnerTest.cpp

Issue 1682423002: Remove WebWaitableEvent and replace it with WaitableEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android build Created 4 years, 10 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/threading/BackgroundTaskRunnerTest.cpp
diff --git a/third_party/WebKit/Source/platform/threading/BackgroundTaskRunnerTest.cpp b/third_party/WebKit/Source/platform/threading/BackgroundTaskRunnerTest.cpp
index dd26598149f9f0290d6f140445a5d95639ea3f5c..ec1e6240d6cab20bb0078569c89f15d418a56b16 100644
--- a/third_party/WebKit/Source/platform/threading/BackgroundTaskRunnerTest.cpp
+++ b/third_party/WebKit/Source/platform/threading/BackgroundTaskRunnerTest.cpp
@@ -5,7 +5,7 @@
#include "platform/threading/BackgroundTaskRunner.h"
#include "platform/ThreadSafeFunctional.h"
-#include "public/platform/Platform.h"
+#include "platform/WaitableEvent.h"
#include "public/platform/WebTraceLocation.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -14,7 +14,7 @@ namespace {
using namespace blink;
-void PingPongTask(WebWaitableEvent* doneEvent)
+void PingPongTask(WaitableEvent* doneEvent)
{
doneEvent->signal();
}
@@ -24,7 +24,7 @@ class BackgroundTaskRunnerTest : public testing::Test {
TEST_F(BackgroundTaskRunnerTest, RunShortTaskOnBackgroundThread)
{
- OwnPtr<WebWaitableEvent> doneEvent = adoptPtr(Platform::current()->createWaitableEvent());
+ OwnPtr<WaitableEvent> doneEvent = adoptPtr(new WaitableEvent());
BackgroundTaskRunner::postOnBackgroundThread(BLINK_FROM_HERE, threadSafeBind(&PingPongTask, AllowCrossThreadAccess(doneEvent.get())), BackgroundTaskRunner::TaskSizeShortRunningTask);
// Test passes by not hanging on the following wait().
doneEvent->wait();
@@ -32,7 +32,7 @@ TEST_F(BackgroundTaskRunnerTest, RunShortTaskOnBackgroundThread)
TEST_F(BackgroundTaskRunnerTest, RunLongTaskOnBackgroundThread)
{
- OwnPtr<WebWaitableEvent> doneEvent = adoptPtr(Platform::current()->createWaitableEvent());
+ OwnPtr<WaitableEvent> doneEvent = adoptPtr(new WaitableEvent());
BackgroundTaskRunner::postOnBackgroundThread(BLINK_FROM_HERE, threadSafeBind(&PingPongTask, AllowCrossThreadAccess(doneEvent.get())), BackgroundTaskRunner::TaskSizeLongRunningTask);
// Test passes by not hanging on the following wait().
doneEvent->wait();
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp ('k') | third_party/WebKit/public/blink_headers.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698