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

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

Issue 2633293003: Remove TestingPlatformMockScheduler (Closed)
Patch Set: Created 3 years, 11 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 std::unique_ptr<WebScrollbar>, 77 std::unique_ptr<WebScrollbar>,
78 WebScrollbarThemePainter, 78 WebScrollbarThemePainter,
79 std::unique_ptr<WebScrollbarThemeGeometry>) override; 79 std::unique_ptr<WebScrollbarThemeGeometry>) override;
80 std::unique_ptr<WebScrollbarLayer> createSolidColorScrollbarLayer( 80 std::unique_ptr<WebScrollbarLayer> createSolidColorScrollbarLayer(
81 WebScrollbar::Orientation, 81 WebScrollbar::Orientation,
82 int thumbThickness, 82 int thumbThickness,
83 int trackStart, 83 int trackStart,
84 bool isLeftSideVerticalScrollbar) override; 84 bool isLeftSideVerticalScrollbar) override;
85 }; 85 };
86 86
87 class TestingPlatformMockScheduler : public WebScheduler {
88 WTF_MAKE_NONCOPYABLE(TestingPlatformMockScheduler);
89
90 public:
91 TestingPlatformMockScheduler();
92 ~TestingPlatformMockScheduler() override;
93
94 // WebScheduler implementation:
95 WebTaskRunner* loadingTaskRunner() override { return nullptr; }
96 WebTaskRunner* timerTaskRunner() override { return nullptr; }
97 void shutdown() override {}
98 bool shouldYieldForHighPriorityWork() override { return false; }
99 bool canExceedIdleDeadlineIfRequired() override { return false; }
100 void postIdleTask(const WebTraceLocation&, WebThread::IdleTask*) override {}
101 void postNonNestableIdleTask(const WebTraceLocation&,
102 WebThread::IdleTask*) override {}
103 std::unique_ptr<WebViewScheduler> createWebViewScheduler(
104 InterventionReporter*,
105 WebViewScheduler::WebViewSchedulerSettings*) override {
106 return nullptr;
107 }
108 void suspendTimerQueue() override {}
109 void resumeTimerQueue() override {}
110 void addPendingNavigation(WebScheduler::NavigatingFrameType) override {}
111 void removePendingNavigation(WebScheduler::NavigatingFrameType) override {}
112 };
113
114 // A base class to override Platform methods for testing. You can override the 87 // A base class to override Platform methods for testing. You can override the
115 // behavior by subclassing TestingPlatformSupport or using 88 // behavior by subclassing TestingPlatformSupport or using
116 // ScopedTestingPlatformSupport (see below). 89 // ScopedTestingPlatformSupport (see below).
117 class TestingPlatformSupport : public Platform { 90 class TestingPlatformSupport : public Platform {
118 WTF_MAKE_NONCOPYABLE(TestingPlatformSupport); 91 WTF_MAKE_NONCOPYABLE(TestingPlatformSupport);
119 92
120 public: 93 public:
121 struct Config { 94 struct Config {
122 WebCompositorSupport* compositorSupport = nullptr; 95 WebCompositorSupport* compositorSupport = nullptr;
123 }; 96 };
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 m_discardableMemoryAllocator; 230 m_discardableMemoryAllocator;
258 std::unique_ptr<DummyPlatform> m_dummyPlatform; 231 std::unique_ptr<DummyPlatform> m_dummyPlatform;
259 std::unique_ptr<cc_blink::WebCompositorSupportImpl> m_compositorSupport; 232 std::unique_ptr<cc_blink::WebCompositorSupportImpl> m_compositorSupport;
260 TestingPlatformSupport::Config m_testingPlatformConfig; 233 TestingPlatformSupport::Config m_testingPlatformConfig;
261 std::unique_ptr<TestingPlatformSupport> m_testingPlatformSupport; 234 std::unique_ptr<TestingPlatformSupport> m_testingPlatformSupport;
262 }; 235 };
263 236
264 } // namespace blink 237 } // namespace blink
265 238
266 #endif // TestingPlatformSupport_h 239 #endif // TestingPlatformSupport_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698