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

Side by Side Diff: services/device/generic_sensor/platform_sensor_and_provider_unittest_win.cc

Issue 2865263002: Move //device/generic_sensor to be part of the internal implementation of the Device Service. (Closed)
Patch Set: code rebase Created 3 years, 7 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 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <SensorsApi.h> 5 #include <SensorsApi.h>
6 #include <objbase.h> 6 #include <objbase.h>
7 #include <propvarutil.h> 7 #include <propvarutil.h>
8 #include <sensors.h> 8 #include <sensors.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 #include "base/win/iunknown_impl.h" 14 #include "base/win/iunknown_impl.h"
15 #include "base/win/scoped_propvariant.h" 15 #include "base/win/scoped_propvariant.h"
16 #include "device/generic_sensor/generic_sensor_consts.h" 16 #include "services/device/generic_sensor/generic_sensor_consts.h"
17 #include "device/generic_sensor/platform_sensor_provider_win.h" 17 #include "services/device/generic_sensor/platform_sensor_provider_win.h"
18 #include "device/generic_sensor/public/interfaces/sensor_provider.mojom.h" 18 #include "services/device/public/interfaces/sensor_provider.mojom.h"
19 #include "testing/gmock/include/gmock/gmock.h" 19 #include "testing/gmock/include/gmock/gmock.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 21
22 using ::testing::_; 22 using ::testing::_;
23 using ::testing::Invoke; 23 using ::testing::Invoke;
24 using ::testing::IsNull; 24 using ::testing::IsNull;
25 using ::testing::NiceMock; 25 using ::testing::NiceMock;
26 using ::testing::NotNull; 26 using ::testing::NotNull;
27 using ::testing::Return; 27 using ::testing::Return;
28 using ::testing::WithArgs; 28 using ::testing::WithArgs;
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 static_cast<SensorReadingSharedBuffer*>(mapping.get()); 714 static_cast<SensorReadingSharedBuffer*>(mapping.get());
715 715
716 EXPECT_THAT(buffer->reading.values[0], -x); 716 EXPECT_THAT(buffer->reading.values[0], -x);
717 EXPECT_THAT(buffer->reading.values[1], -y); 717 EXPECT_THAT(buffer->reading.values[1], -y);
718 EXPECT_THAT(buffer->reading.values[2], -z); 718 EXPECT_THAT(buffer->reading.values[2], -z);
719 EXPECT_THAT(buffer->reading.values[3], w); 719 EXPECT_THAT(buffer->reading.values[3], w);
720 EXPECT_TRUE(sensor->StopListening(client.get(), configuration)); 720 EXPECT_TRUE(sensor->StopListening(client.get(), configuration));
721 } 721 }
722 722
723 } // namespace device 723 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698