OLD | NEW |
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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/macros.h" | 6 #include "base/macros.h" |
7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
8 #include "base/synchronization/waitable_event.h" | 8 #include "base/synchronization/waitable_event.h" |
9 #include "base/threading/platform_thread.h" | 9 #include "base/threading/platform_thread.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
12 #include "content/public/browser/web_contents.h" | 12 #include "content/public/browser/web_contents.h" |
13 #include "content/public/common/content_switches.h" | 13 #include "content/public/common/content_switches.h" |
14 #include "content/public/test/content_browser_test.h" | 14 #include "content/public/test/content_browser_test.h" |
15 #include "content/public/test/content_browser_test_utils.h" | 15 #include "content/public/test/content_browser_test_utils.h" |
16 #include "content/public/test/test_navigation_observer.h" | 16 #include "content/public/test/test_navigation_observer.h" |
17 #include "content/public/test/test_utils.h" | 17 #include "content/public/test/test_utils.h" |
18 #include "content/shell/browser/shell.h" | 18 #include "content/shell/browser/shell.h" |
19 #include "content/shell/browser/shell_javascript_dialog_manager.h" | 19 #include "content/shell/browser/shell_javascript_dialog_manager.h" |
20 #include "device/generic_sensor/platform_sensor.h" | 20 #include "services/device/generic_sensor/platform_sensor.h" |
21 #include "device/generic_sensor/platform_sensor_provider.h" | 21 #include "services/device/generic_sensor/platform_sensor_provider.h" |
22 #include "device/generic_sensor/sensor_provider_impl.h" | 22 #include "services/device/generic_sensor/sensor_provider_impl.h" |
23 | 23 |
24 namespace content { | 24 namespace content { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 class FakeAmbientLightSensor : public device::PlatformSensor { | 28 class FakeAmbientLightSensor : public device::PlatformSensor { |
29 public: | 29 public: |
30 FakeAmbientLightSensor(device::mojom::SensorType type, | 30 FakeAmbientLightSensor(device::mojom::SensorType type, |
31 mojo::ScopedSharedBufferMapping mapping, | 31 mojo::ScopedSharedBufferMapping mapping, |
32 device::PlatformSensorProvider* provider) | 32 device::PlatformSensorProvider* provider) |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // expects to get events with fake values then navigates to #pass. | 127 // expects to get events with fake values then navigates to #pass. |
128 GURL test_url = | 128 GURL test_url = |
129 GetTestUrl("generic_sensor", "ambient_light_sensor_test.html"); | 129 GetTestUrl("generic_sensor", "ambient_light_sensor_test.html"); |
130 NavigateToURLBlockUntilNavigationsComplete(shell(), test_url, 2); | 130 NavigateToURLBlockUntilNavigationsComplete(shell(), test_url, 2); |
131 EXPECT_EQ("pass", shell()->web_contents()->GetLastCommittedURL().ref()); | 131 EXPECT_EQ("pass", shell()->web_contents()->GetLastCommittedURL().ref()); |
132 } | 132 } |
133 | 133 |
134 } // namespace | 134 } // namespace |
135 | 135 |
136 } // namespace content | 136 } // namespace content |
OLD | NEW |