| OLD | NEW |
| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/macros.h" | 6 #include "base/macros.h" |
| 7 #include "base/synchronization/waitable_event.h" | 7 #include "base/synchronization/waitable_event.h" |
| 8 #include "base/threading/platform_thread.h" | 8 #include "base/threading/platform_thread.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "content/browser/device_sensors/data_fetcher_shared_memory.h" | 10 #include "content/browser/device_sensors/data_fetcher_shared_memory.h" |
| 11 #include "content/browser/device_sensors/device_sensor_service.h" | 11 #include "content/browser/device_sensors/device_sensor_service.h" |
| 12 #include "content/common/device_sensors/device_light_hardware_buffer.h" | |
| 13 #include "content/common/device_sensors/device_motion_hardware_buffer.h" | |
| 14 #include "content/common/device_sensors/device_orientation_hardware_buffer.h" | |
| 15 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
| 16 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
| 17 #include "content/public/common/content_switches.h" | 14 #include "content/public/common/content_switches.h" |
| 18 #include "content/public/test/content_browser_test.h" | 15 #include "content/public/test/content_browser_test.h" |
| 19 #include "content/public/test/content_browser_test_utils.h" | 16 #include "content/public/test/content_browser_test_utils.h" |
| 20 #include "content/public/test/test_navigation_observer.h" | 17 #include "content/public/test/test_navigation_observer.h" |
| 21 #include "content/public/test/test_utils.h" | 18 #include "content/public/test/test_utils.h" |
| 22 #include "content/shell/browser/shell.h" | 19 #include "content/shell/browser/shell.h" |
| 23 #include "content/shell/browser/shell_javascript_dialog_manager.h" | 20 #include "content/shell/browser/shell_javascript_dialog_manager.h" |
| 21 #include "device/sensors/public/cpp/device_light_hardware_buffer.h" |
| 22 #include "device/sensors/public/cpp/device_motion_hardware_buffer.h" |
| 23 #include "device/sensors/public/cpp/device_orientation_hardware_buffer.h" |
| 24 | 24 |
| 25 namespace content { | 25 namespace content { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 class FakeDataFetcher : public DataFetcherSharedMemory { | 29 class FakeDataFetcher : public DataFetcherSharedMemory { |
| 30 public: | 30 public: |
| 31 FakeDataFetcher() | 31 FakeDataFetcher() |
| 32 : started_orientation_(base::WaitableEvent::ResetPolicy::AUTOMATIC, | 32 : started_orientation_(base::WaitableEvent::ResetPolicy::AUTOMATIC, |
| 33 base::WaitableEvent::InitialState::NOT_SIGNALED), | 33 base::WaitableEvent::InitialState::NOT_SIGNALED), |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 fetcher_->stopped_motion_.Wait(); | 328 fetcher_->stopped_motion_.Wait(); |
| 329 fetcher_->started_orientation_.Wait(); | 329 fetcher_->started_orientation_.Wait(); |
| 330 fetcher_->stopped_orientation_.Wait(); | 330 fetcher_->stopped_orientation_.Wait(); |
| 331 same_tab_observer.Wait(); | 331 same_tab_observer.Wait(); |
| 332 EXPECT_EQ("pass", shell()->web_contents()->GetLastCommittedURL().ref()); | 332 EXPECT_EQ("pass", shell()->web_contents()->GetLastCommittedURL().ref()); |
| 333 } | 333 } |
| 334 | 334 |
| 335 } // namespace | 335 } // namespace |
| 336 | 336 |
| 337 } // namespace content | 337 } // namespace content |
| OLD | NEW |