Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / content / browser / device_sensors / sensor_manager_android_unittest.cc
index 560f314..b5f0c5f 100644 (file)
@@ -19,7 +19,7 @@ class FakeSensorManagerAndroid : public SensorManagerAndroid {
   FakeSensorManagerAndroid() { }
   virtual ~FakeSensorManagerAndroid() { }
 
-  virtual int GetNumberActiveDeviceMotionSensors() OVERRIDE {
+  virtual int GetNumberActiveDeviceMotionSensors() override {
     return number_active_sensors_;
   }
 
@@ -28,11 +28,11 @@ class FakeSensorManagerAndroid : public SensorManagerAndroid {
   }
 
  protected:
-  virtual bool Start(EventType event_type) OVERRIDE {
+  virtual bool Start(EventType event_type) override {
     return true;
   }
 
-  virtual void Stop(EventType event_type) OVERRIDE {
+  virtual void Stop(EventType event_type) override {
   }
 
  private:
@@ -86,7 +86,8 @@ TEST_F(AndroidSensorManagerTest, ThreeDeviceMotionSensorsActive) {
   ASSERT_TRUE(motion_buffer_->data.hasRotationRateBeta);
   ASSERT_EQ(9, motion_buffer_->data.rotationRateGamma);
   ASSERT_TRUE(motion_buffer_->data.hasRotationRateGamma);
-  ASSERT_EQ(kInertialSensorIntervalMillis, motion_buffer_->data.interval);
+  ASSERT_EQ(kInertialSensorIntervalMicroseconds / 1000.,
+            motion_buffer_->data.interval);
 
   sensorManager.StopFetchingDeviceMotionData();
   ASSERT_FALSE(motion_buffer_->data.allAvailableSensorsAreActive);
@@ -105,7 +106,8 @@ TEST_F(AndroidSensorManagerTest, TwoDeviceMotionSensorsActive) {
 
   sensorManager.GotAccelerationIncludingGravity(0, 0, 1, 2, 3);
   ASSERT_TRUE(motion_buffer_->data.allAvailableSensorsAreActive);
-  ASSERT_EQ(kInertialSensorIntervalMillis, motion_buffer_->data.interval);
+  ASSERT_EQ(kInertialSensorIntervalMicroseconds / 1000.,
+            motion_buffer_->data.interval);
 
   sensorManager.StopFetchingDeviceMotionData();
   ASSERT_FALSE(motion_buffer_->data.allAvailableSensorsAreActive);
@@ -118,7 +120,8 @@ TEST_F(AndroidSensorManagerTest, ZeroDeviceMotionSensorsActive) {
 
   sensorManager.StartFetchingDeviceMotionData(motion_buffer_.get());
   ASSERT_TRUE(motion_buffer_->data.allAvailableSensorsAreActive);
-  ASSERT_EQ(kInertialSensorIntervalMillis, motion_buffer_->data.interval);
+  ASSERT_EQ(kInertialSensorIntervalMicroseconds / 1000.,
+            motion_buffer_->data.interval);
 
   sensorManager.StopFetchingDeviceMotionData();
   ASSERT_FALSE(motion_buffer_->data.allAvailableSensorsAreActive);