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

Unified Diff: ash/wm/maximize_mode/maximize_mode_controller_unittest.cc

Issue 934843002: Implement DeviceMotionEvent API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
diff --git a/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc b/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
index 5a4a018029206e4a0123390320c310168b5fa6d4..bdbb25c25a800f586e437150f29f75484e30fd8e 100644
--- a/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
+++ b/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
@@ -77,19 +77,21 @@ class MaximizeModeControllerTest : public test::AshTestBase {
}
void TriggerLidUpdate(const gfx::Vector3dF& lid) {
- chromeos::AccelerometerUpdate update;
- update.Set(chromeos::ACCELEROMETER_SOURCE_SCREEN, lid.x(), lid.y(),
- lid.z());
+ scoped_refptr<chromeos::AccelerometerUpdate> update(
+ new chromeos::AccelerometerUpdate());
+ update->Set(chromeos::ACCELEROMETER_SOURCE_SCREEN, lid.x(), lid.y(),
+ lid.z());
maximize_mode_controller()->OnAccelerometerUpdated(update);
}
void TriggerBaseAndLidUpdate(const gfx::Vector3dF& base,
const gfx::Vector3dF& lid) {
- chromeos::AccelerometerUpdate update;
- update.Set(chromeos::ACCELEROMETER_SOURCE_ATTACHED_KEYBOARD, base.x(),
- base.y(), base.z());
- update.Set(chromeos::ACCELEROMETER_SOURCE_SCREEN, lid.x(), lid.y(),
- lid.z());
+ scoped_refptr<chromeos::AccelerometerUpdate> update(
+ new chromeos::AccelerometerUpdate());
+ update->Set(chromeos::ACCELEROMETER_SOURCE_ATTACHED_KEYBOARD, base.x(),
+ base.y(), base.z());
+ update->Set(chromeos::ACCELEROMETER_SOURCE_SCREEN, lid.x(), lid.y(),
+ lid.z());
maximize_mode_controller()->OnAccelerometerUpdated(update);
}

Powered by Google App Engine
This is Rietveld 408576698