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

Side by Side Diff: device/generic_sensor/mock_platform_sensor_provider.h

Issue 2306333002: [sensors] Add Generic Sensor platform unit tests. (Closed)
Patch Set: Mikhail's comments Created 4 years, 3 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef DEVICE_GENERIC_SENSOR_MOCK_PLATFORM_SENSOR_PROVIDER_H_
6 #define DEVICE_GENERIC_SENSOR_MOCK_PLATFORM_SENSOR_PROVIDER_H_
7
8 #include "device/generic_sensor/platform_sensor_provider.h"
9
10 namespace device {
11
12 class MockPlatformSensorProvider : public PlatformSensorProvider {
timvolodine 2016/09/13 19:38:53 I think we usually call these type of classes "fak
timvolodine 2016/09/13 19:38:53 also small "fake" test classes can be placed insid
maksims (do not use this acc) 2016/09/16 09:22:19 Good point, but these classes more or less resembl
timvolodine 2016/09/19 17:14:29 Why? Is there any reason it should be called a 'mo
maksims (do not use this acc) 2016/09/21 11:05:19 OK, I went through mock and fakes and it seems lik
13 public:
14 MockPlatformSensorProvider();
15 ~MockPlatformSensorProvider() override;
16
17 static MockPlatformSensorProvider* GetInstance();
18
19 protected:
20 scoped_refptr<PlatformSensor> CreateSensorInternal(
21 mojom::SensorType type,
22 mojo::ScopedSharedBufferMapping mapping,
23 uint64_t buffer_size) override;
24
25 private:
26 DISALLOW_COPY_AND_ASSIGN(MockPlatformSensorProvider);
27 };
28
29 } // namespace device
30
31 #endif /* DEVICE_GENERIC_SENSOR_MOCK_PLATFORM_SENSOR_PROVIDER_H_ */
timvolodine 2016/09/13 19:38:53 //
maksims (do not use this acc) 2016/09/16 09:22:19 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698