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

Side by Side Diff: third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h

Issue 2199493002: libFuzzer for blink::MHTMLParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback from esprehn@. Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 21 matching lines...) Expand all
32 #define TestingPlatformSupport_h 32 #define TestingPlatformSupport_h
33 33
34 #include "platform/PlatformExport.h" 34 #include "platform/PlatformExport.h"
35 #include "public/platform/Platform.h" 35 #include "public/platform/Platform.h"
36 #include "public/platform/WebCompositorSupport.h" 36 #include "public/platform/WebCompositorSupport.h"
37 #include "public/platform/WebScheduler.h" 37 #include "public/platform/WebScheduler.h"
38 #include "public/platform/WebThread.h" 38 #include "public/platform/WebThread.h"
39 #include "wtf/Vector.h" 39 #include "wtf/Vector.h"
40 #include <memory> 40 #include <memory>
41 41
42 namespace base {
43 class TestDiscardableMemoryAllocator;
44 } // namespace base
45
46 namespace cc_blink {
47 class WebCompositorSupportImpl;
48 } // namespace cc_blink
49
42 namespace blink { 50 namespace blink {
43 51
44 class TestingPlatformMockWebTaskRunner; 52 class TestingPlatformMockWebTaskRunner;
45 class TestingPlatformMockWebThread; 53 class TestingPlatformMockWebThread;
46 class WebCompositorSupport; 54 class WebCompositorSupport;
47 class WebThread; 55 class WebThread;
48 56
49 class TestingCompositorSupport : public WebCompositorSupport { 57 class TestingCompositorSupport : public WebCompositorSupport {
50 }; 58 };
51 59
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 ~TestingPlatformSupportWithMockScheduler() override; 117 ~TestingPlatformSupportWithMockScheduler() override;
110 118
111 // Platform: 119 // Platform:
112 WebThread* currentThread() override; 120 WebThread* currentThread() override;
113 TestingPlatformMockScheduler* mockWebScheduler(); 121 TestingPlatformMockScheduler* mockWebScheduler();
114 122
115 protected: 123 protected:
116 std::unique_ptr<TestingPlatformMockWebThread> m_mockWebThread; 124 std::unique_ptr<TestingPlatformMockWebThread> m_mockWebThread;
117 }; 125 };
118 126
127 class ScopedUnittestsEnvironmentSetup {
128 WTF_MAKE_NONCOPYABLE(ScopedUnittestsEnvironmentSetup);
129 public:
130 ScopedUnittestsEnvironmentSetup(int argc, char** argv);
131 ~ScopedUnittestsEnvironmentSetup();
132
133 private:
134 class DummyPlatform;
135 std::unique_ptr<base::TestDiscardableMemoryAllocator> m_discardableMemoryAll ocator;
136 std::unique_ptr<DummyPlatform> m_platform;
137 std::unique_ptr<cc_blink::WebCompositorSupportImpl> m_compositorSupport;
138 TestingPlatformSupport::Config m_testingPlatformConfig;
139 std::unique_ptr<TestingPlatformSupport> m_testingPlatformSupport;
140 };
141
119 } // namespace blink 142 } // namespace blink
120 143
121 #endif // TestingPlatformSupport_h 144 #endif // TestingPlatformSupport_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698