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

Side by Side Diff: device/sensors/data_fetcher_shared_memory_base_unittest.cc

Issue 2646093002: Move //content/browser/device_sensor/ into device/sensors (Closed)
Patch Set: gn format & code rebase Created 3 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/device_sensors/data_fetcher_shared_memory_base.h" 5 #include "device/sensors/data_fetcher_shared_memory_base.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/process/process_handle.h" 9 #include "base/process/process_handle.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
11 #include "base/synchronization/waitable_event.h" 11 #include "base/synchronization/waitable_event.h"
12 #include "base/threading/thread.h" 12 #include "base/threading/thread.h"
13 #include "device/sensors/public/cpp/device_light_hardware_buffer.h" 13 #include "device/sensors/public/cpp/device_light_hardware_buffer.h"
14 #include "device/sensors/public/cpp/device_motion_hardware_buffer.h" 14 #include "device/sensors/public/cpp/device_motion_hardware_buffer.h"
15 #include "device/sensors/public/cpp/device_orientation_hardware_buffer.h" 15 #include "device/sensors/public/cpp/device_orientation_hardware_buffer.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 17
18 namespace content { 18 namespace device {
19 19
20 namespace { 20 namespace {
21 21
22 class FakeDataFetcher : public DataFetcherSharedMemoryBase { 22 class FakeDataFetcher : public DataFetcherSharedMemoryBase {
23 public: 23 public:
24 FakeDataFetcher() 24 FakeDataFetcher()
25 : start_light_(base::WaitableEvent::ResetPolicy::AUTOMATIC, 25 : start_light_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
26 base::WaitableEvent::InitialState::NOT_SIGNALED), 26 base::WaitableEvent::InitialState::NOT_SIGNALED),
27 start_motion_(base::WaitableEvent::ResetPolicy::AUTOMATIC, 27 start_motion_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
28 base::WaitableEvent::InitialState::NOT_SIGNALED), 28 base::WaitableEvent::InitialState::NOT_SIGNALED),
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 EXPECT_TRUE(fake_data_fetcher.StartFetchingDeviceData( 599 EXPECT_TRUE(fake_data_fetcher.StartFetchingDeviceData(
600 CONSUMER_TYPE_ORIENTATION)); 600 CONSUMER_TYPE_ORIENTATION));
601 fake_data_fetcher.WaitForStart(CONSUMER_TYPE_ORIENTATION); 601 fake_data_fetcher.WaitForStart(CONSUMER_TYPE_ORIENTATION);
602 EXPECT_EQ(0, fake_data_fetcher.GetOrientationBuffer()->data.alpha); 602 EXPECT_EQ(0, fake_data_fetcher.GetOrientationBuffer()->data.alpha);
603 fake_data_fetcher.StopFetchingDeviceData(CONSUMER_TYPE_ORIENTATION); 603 fake_data_fetcher.StopFetchingDeviceData(CONSUMER_TYPE_ORIENTATION);
604 fake_data_fetcher.WaitForStop(CONSUMER_TYPE_ORIENTATION); 604 fake_data_fetcher.WaitForStop(CONSUMER_TYPE_ORIENTATION);
605 } 605 }
606 606
607 } // namespace 607 } // namespace
608 608
609 } // namespace content 609 } // namespace device
OLDNEW
« no previous file with comments | « device/sensors/data_fetcher_shared_memory_base.cc ('k') | device/sensors/data_fetcher_shared_memory_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698