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

Unified Diff: third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.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
« 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 549248e715807604cad8fc5202c12c26f7812ea5..49ea30e7b025f402727db6014a61e8077acb5637 100644
--- a/third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp
@@ -31,6 +31,7 @@
#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"
@@ -55,43 +56,19 @@ private:
size_t m_length;
};
-class OriginAccessEntryTestPlatform : public blink::Platform {
+class OriginAccessEntryTestPlatform : public TestingPlatformSupport {
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;
};
@@ -313,4 +290,3 @@ TEST(OriginAccessEntryTest, IPAddressMatchingTest)
}
} // 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