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

Side by Side Diff: device/generic_sensor/platform_sensor_provider_unittest_android.cc

Issue 2896583005: Reland: Refactor DeviceMotionEventPump to use //device/generic_sensor instead of //device/sensors (Closed)
Patch Set: fix compile error on Windows Created 3 years, 5 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 2017 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 #include "device/generic_sensor/platform_sensor_provider_android.h"
6
7 #include "base/macros.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9
10 namespace device {
11
12 class PlatformSensorProviderTestAndroid : public testing::Test {
13 public:
14 PlatformSensorProviderTestAndroid() = default;
15
16 void SetUp() override {
17 provider_ = PlatformSensorProviderAndroid::GetInstance();
18 ASSERT_TRUE(provider_);
19 }
20
21 void CreateSensorCallback(scoped_refptr<PlatformSensor> sensor) {
22 EXPECT_FALSE(sensor);
23 }
24
25 protected:
26 PlatformSensorProviderAndroid* provider_;
27
28 private:
29 DISALLOW_COPY_AND_ASSIGN(PlatformSensorProviderTestAndroid);
30 };
31
32 TEST_F(PlatformSensorProviderTestAndroid, SensorManagerIsNull) {
33 provider_->SetSensorManagerToNullForTesting();
34 provider_->CreateSensor(
35 device::mojom::SensorType::AMBIENT_LIGHT,
36 base::Bind(&PlatformSensorProviderTestAndroid::CreateSensorCallback,
37 base::Unretained(this)));
38 }
39
40 } // namespace device
OLDNEW
« no previous file with comments | « device/generic_sensor/platform_sensor_provider_android.cc ('k') | device/generic_sensor/platform_sensor_provider_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698