| Index: content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
|
| diff --git a/content/renderer/device_orientation/device_orientation_event_pump_unittest.cc b/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
|
| similarity index 91%
|
| rename from content/renderer/device_orientation/device_orientation_event_pump_unittest.cc
|
| rename to content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
|
| index b5c86bf1e25ee3028a77ad8b06812d50379ef87b..8651d5c9e92ee6382fc7763a14339e54faa6a54d 100644
|
| --- a/content/renderer/device_orientation/device_orientation_event_pump_unittest.cc
|
| +++ b/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
|
| @@ -6,7 +6,7 @@
|
|
|
| #include "base/logging.h"
|
| #include "base/message_loop/message_loop.h"
|
| -#include "content/common/device_orientation/device_orientation_hardware_buffer.h"
|
| +#include "content/common/device_sensors/device_orientation_hardware_buffer.h"
|
| #include "content/public/test/test_utils.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "third_party/WebKit/public/platform/WebDeviceOrientationListener.h"
|
| @@ -115,11 +115,11 @@ TEST_F(DeviceOrientationEventPumpTest, MAYBE_DidStartPolling) {
|
| blink::WebDeviceOrientationData& received_data = listener_->data_;
|
| EXPECT_TRUE(listener_->did_change_device_orientation_);
|
| EXPECT_TRUE(received_data.allAvailableSensorsAreActive);
|
| - EXPECT_EQ(1, (double)received_data.alpha);
|
| + EXPECT_EQ(1, static_cast<double>(received_data.alpha));
|
| EXPECT_TRUE(received_data.hasAlpha);
|
| - EXPECT_EQ(2, (double)received_data.beta);
|
| + EXPECT_EQ(2, static_cast<double>(received_data.beta));
|
| EXPECT_TRUE(received_data.hasBeta);
|
| - EXPECT_EQ(3, (double)received_data.gamma);
|
| + EXPECT_EQ(3, static_cast<double>(received_data.gamma));
|
| EXPECT_TRUE(received_data.hasGamma);
|
| }
|
|
|
| @@ -167,11 +167,11 @@ TEST_F(DeviceOrientationEventPumpTest,
|
| blink::WebDeviceOrientationData& received_data = listener_->data_;
|
| EXPECT_TRUE(listener_->did_change_device_orientation_);
|
| EXPECT_TRUE(received_data.allAvailableSensorsAreActive);
|
| - EXPECT_EQ(1, (double)received_data.alpha);
|
| + EXPECT_EQ(1, static_cast<double>(received_data.alpha));
|
| EXPECT_TRUE(received_data.hasAlpha);
|
| - EXPECT_EQ(2, (double)received_data.beta);
|
| + EXPECT_EQ(2, static_cast<double>(received_data.beta));
|
| EXPECT_TRUE(received_data.hasBeta);
|
| - EXPECT_EQ(3, (double)received_data.gamma);
|
| + EXPECT_EQ(3, static_cast<double>(received_data.gamma));
|
| EXPECT_TRUE(received_data.hasGamma);
|
|
|
| buffer_->data.alpha =
|
| @@ -185,11 +185,11 @@ TEST_F(DeviceOrientationEventPumpTest,
|
|
|
| EXPECT_FALSE(listener_->did_change_device_orientation_);
|
| EXPECT_TRUE(received_data.allAvailableSensorsAreActive);
|
| - EXPECT_EQ(1, (double)received_data.alpha);
|
| + EXPECT_EQ(1, static_cast<double>(received_data.alpha));
|
| EXPECT_TRUE(received_data.hasAlpha);
|
| - EXPECT_EQ(2, (double)received_data.beta);
|
| + EXPECT_EQ(2, static_cast<double>(received_data.beta));
|
| EXPECT_TRUE(received_data.hasBeta);
|
| - EXPECT_EQ(3, (double)received_data.gamma);
|
| + EXPECT_EQ(3, static_cast<double>(received_data.gamma));
|
| EXPECT_TRUE(received_data.hasGamma);
|
|
|
| buffer_->data.alpha =
|
| @@ -203,7 +203,7 @@ TEST_F(DeviceOrientationEventPumpTest,
|
|
|
| EXPECT_TRUE(listener_->did_change_device_orientation_);
|
| EXPECT_EQ(1 + DeviceOrientationEventPump::kOrientationThreshold,
|
| - (double)received_data.alpha);
|
| + static_cast<double>(received_data.alpha));
|
| }
|
|
|
| } // namespace content
|
|
|