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

Unified Diff: content/renderer/device_sensors/device_orientation_event_pump_unittest.cc

Issue 2415083002: Move Device Sensors client files from Blink to //device/sensors client lib (Closed)
Patch Set: Rebase Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
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 6fffbfcd6a854d9eb0f0d11ff7d8bf662021b761..fda6372a15cd51fbc5dfe2b4ea9b75fe417b9e18 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);
};
@@ -88,7 +86,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;
@@ -99,7 +97,7 @@ class DeviceOrientationEventPumpTest : public testing::Test {
}
void InitBufferNoData() {
- blink::WebDeviceOrientationData& data = buffer()->data;
+ device::OrientationData& data = buffer()->data;
data.allAvailableSensorsAreActive = true;
}
@@ -133,7 +131,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));
@@ -151,7 +149,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);
@@ -166,7 +164,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));
« no previous file with comments | « content/renderer/device_sensors/device_orientation_event_pump.cc ('k') | content/renderer/renderer_blink_platform_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698