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

Unified Diff: third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp

Issue 1464953003: Revert of More regular Platform implementations in unit tests (reland.) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/platform/text/LocaleMacTest.cpp ('k') | third_party/WebKit/Source/web/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp
diff --git a/third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp b/third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp
index 49ea30e7b025f402727db6014a61e8077acb5637..549248e715807604cad8fc5202c12c26f7812ea5 100644
--- a/third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp
@@ -31,7 +31,6 @@
#include "config.h"
#include "platform/weborigin/OriginAccessEntry.h"
-#include "platform/testing/TestingPlatformSupport.h"
#include "platform/weborigin/KURL.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "public/platform/Platform.h"
@@ -56,19 +55,43 @@
size_t m_length;
};
-class OriginAccessEntryTestPlatform : public TestingPlatformSupport {
+class OriginAccessEntryTestPlatform : public blink::Platform {
public:
+ OriginAccessEntryTestPlatform()
+ : m_oldPlatform(Platform::current())
+ {
+ Platform::initialize(this);
+ }
+
+ ~OriginAccessEntryTestPlatform()
+ {
+ Platform::initialize(m_oldPlatform);
+ }
+
blink::WebPublicSuffixList* publicSuffixList() override
{
return &m_suffixList;
}
+ // Stub for pure virtual method.
+ void cryptographicallyRandomValues(unsigned char*, size_t) override
+ {
+ RELEASE_ASSERT_NOT_REACHED();
+ }
+
+ const unsigned char* getTraceCategoryEnabledFlag(const char* categoryName) override
+ {
+ static const unsigned char tracingIsDisabled = 0;
+ return &tracingIsDisabled;
+ }
+
void setPublicSuffix(const blink::WebString& suffix)
{
m_suffixList.setPublicSuffix(suffix);
}
private:
+ blink::Platform* m_oldPlatform;
OriginAccessEntryTestSuffixList m_suffixList;
};
@@ -290,3 +313,4 @@
}
} // namespace blink
+
« no previous file with comments | « third_party/WebKit/Source/platform/text/LocaleMacTest.cpp ('k') | third_party/WebKit/Source/web/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698