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

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

Issue 1845323002: Remove WebUnitTestSupport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 WebCompositorSupport* TestingPlatformSupport::compositorSupport() 58 WebCompositorSupport* TestingPlatformSupport::compositorSupport()
59 { 59 {
60 return m_config.compositorSupport; 60 return m_config.compositorSupport;
61 } 61 }
62 62
63 WebThread* TestingPlatformSupport::currentThread() 63 WebThread* TestingPlatformSupport::currentThread()
64 { 64 {
65 return m_oldPlatform ? m_oldPlatform->currentThread() : nullptr; 65 return m_oldPlatform ? m_oldPlatform->currentThread() : nullptr;
66 } 66 }
67 67
68 WebUnitTestSupport* TestingPlatformSupport::unitTestSupport()
69 {
70 return m_oldPlatform ? m_oldPlatform->unitTestSupport() : nullptr;
71 }
72
73 class TestingPlatformMockWebTaskRunner : public WebTaskRunner { 68 class TestingPlatformMockWebTaskRunner : public WebTaskRunner {
74 WTF_MAKE_NONCOPYABLE(TestingPlatformMockWebTaskRunner); 69 WTF_MAKE_NONCOPYABLE(TestingPlatformMockWebTaskRunner);
75 public: 70 public:
76 explicit TestingPlatformMockWebTaskRunner(Deque<OwnPtr<WebTaskRunner::Task>> * tasks) : m_tasks(tasks) { } 71 explicit TestingPlatformMockWebTaskRunner(Deque<OwnPtr<WebTaskRunner::Task>> * tasks) : m_tasks(tasks) { }
77 ~TestingPlatformMockWebTaskRunner() override { } 72 ~TestingPlatformMockWebTaskRunner() override { }
78 73
79 void postTask(const WebTraceLocation&, Task* task) override 74 void postTask(const WebTraceLocation&, Task* task) override
80 { 75 {
81 m_tasks->append(adoptPtr(task)); 76 m_tasks->append(adoptPtr(task));
82 } 77 }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 { 178 {
184 return m_mockWebThread.get(); 179 return m_mockWebThread.get();
185 } 180 }
186 181
187 TestingPlatformMockScheduler* TestingPlatformSupportWithMockScheduler::mockWebSc heduler() 182 TestingPlatformMockScheduler* TestingPlatformSupportWithMockScheduler::mockWebSc heduler()
188 { 183 {
189 return m_mockWebThread->mockWebScheduler(); 184 return m_mockWebThread->mockWebScheduler();
190 } 185 }
191 186
192 } // namespace blink 187 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698