| Index: content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
|
| diff --git a/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc b/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
|
| index 0eaa29743b20815dc9598fc7197e1ecba2ac2913..b727d2a550c3b333f4e94a4acf4753e857b9eb4c 100644
|
| --- a/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
|
| +++ b/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
|
| @@ -28,7 +28,7 @@ class MockDeviceOrientationListener
|
| ~MockDeviceOrientationListener() override {}
|
|
|
| void didChangeDeviceOrientation(
|
| - const blink::WebDeviceOrientationData& data) override {
|
| + const device::OrientationData& data) override {
|
| memcpy(&data_, &data, sizeof(data));
|
| did_change_device_orientation_ = true;
|
| }
|
| @@ -39,13 +39,11 @@ class MockDeviceOrientationListener
|
| void set_did_change_device_orientation(bool value) {
|
| did_change_device_orientation_ = value;
|
| }
|
| - const blink::WebDeviceOrientationData& data() const {
|
| - return data_;
|
| - }
|
| + const device::OrientationData& data() const { return data_; }
|
|
|
| private:
|
| bool did_change_device_orientation_;
|
| - blink::WebDeviceOrientationData data_;
|
| + device::OrientationData data_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(MockDeviceOrientationListener);
|
| };
|
| @@ -87,7 +85,7 @@ class DeviceOrientationEventPumpTest : public testing::Test {
|
| }
|
|
|
| void InitBuffer() {
|
| - blink::WebDeviceOrientationData& data = buffer()->data;
|
| + device::OrientationData& data = buffer()->data;
|
| data.alpha = 1;
|
| data.hasAlpha = true;
|
| data.beta = 2;
|
| @@ -98,7 +96,7 @@ class DeviceOrientationEventPumpTest : public testing::Test {
|
| }
|
|
|
| void InitBufferNoData() {
|
| - blink::WebDeviceOrientationData& data = buffer()->data;
|
| + device::OrientationData& data = buffer()->data;
|
| data.allAvailableSensorsAreActive = true;
|
| }
|
|
|
| @@ -131,7 +129,7 @@ TEST_F(DeviceOrientationEventPumpTest, DidStartPolling) {
|
|
|
| base::RunLoop().Run();
|
|
|
| - const blink::WebDeviceOrientationData& received_data = listener()->data();
|
| + const device::OrientationData& received_data = listener()->data();
|
| EXPECT_TRUE(listener()->did_change_device_orientation());
|
| EXPECT_TRUE(received_data.allAvailableSensorsAreActive);
|
| EXPECT_EQ(1, static_cast<double>(received_data.alpha));
|
| @@ -149,7 +147,7 @@ TEST_F(DeviceOrientationEventPumpTest, FireAllNullEvent) {
|
|
|
| base::RunLoop().Run();
|
|
|
| - const blink::WebDeviceOrientationData& received_data = listener()->data();
|
| + const device::OrientationData& received_data = listener()->data();
|
| EXPECT_TRUE(listener()->did_change_device_orientation());
|
| EXPECT_TRUE(received_data.allAvailableSensorsAreActive);
|
| EXPECT_FALSE(received_data.hasAlpha);
|
| @@ -164,7 +162,7 @@ TEST_F(DeviceOrientationEventPumpTest, UpdateRespectsOrientationThreshold) {
|
|
|
| base::RunLoop().Run();
|
|
|
| - const blink::WebDeviceOrientationData& received_data = listener()->data();
|
| + const device::OrientationData& received_data = listener()->data();
|
| EXPECT_TRUE(listener()->did_change_device_orientation());
|
| EXPECT_TRUE(received_data.allAvailableSensorsAreActive);
|
| EXPECT_EQ(1, static_cast<double>(received_data.alpha));
|
|
|