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

Unified Diff: third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp

Issue 1456873003: More regular Platform implementations in unit tests (reland.) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: have GN disable c4267 also Created 5 years, 1 month 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/testing/TestingPlatformSupport.cpp
diff --git a/third_party/WebKit/Source/platform/TestingPlatformSupport.cpp b/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp
similarity index 91%
rename from third_party/WebKit/Source/platform/TestingPlatformSupport.cpp
rename to third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp
index fcb4dbb73b56feb99c3894e35c66a3870fbe5dd0..8939238558d0126bfd7e67c947a3121292177429 100644
--- a/third_party/WebKit/Source/platform/TestingPlatformSupport.cpp
+++ b/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp
@@ -30,7 +30,7 @@
#include "config.h"
-#include "platform/TestingPlatformSupport.h"
+#include "platform/testing/TestingPlatformSupport.h"
namespace blink {
@@ -69,6 +69,11 @@ WebMemoryAllocatorDump* TestingDiscardableMemory::createMemoryAllocatorDump(cons
return nullptr;
}
+TestingPlatformSupport::TestingPlatformSupport()
+ : TestingPlatformSupport(TestingPlatformSupport::Config())
+{
+}
+
TestingPlatformSupport::TestingPlatformSupport(const Config& config)
: m_config(config)
, m_oldPlatform(Platform::current())
@@ -107,4 +112,9 @@ WebCompositorSupport* TestingPlatformSupport::compositorSupport()
return m_config.compositorSupport;
}
+WebThread* TestingPlatformSupport::currentThread()
+{
+ return m_oldPlatform ? m_oldPlatform->currentThread() : nullptr;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698