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

Unified Diff: components/test_runner/test_runner.cc

Issue 2145873003: Initialize all parameters for MockDeviceMotion interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/test_runner.cc
diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc
index e4633ed382edda1c271d5f17891f67157b4ac99a..d8ca4f4a6730ae13bf187c12c87daeea07d896c9 100644
--- a/components/test_runner/test_runner.cc
+++ b/components/test_runner/test_runner.cc
@@ -843,45 +843,45 @@ void TestRunnerBindings::SetMockDeviceMotion(gin::Arguments* args) {
if (!runner_)
return;
- bool has_acceleration_x;
- double acceleration_x;
- bool has_acceleration_y;
- double acceleration_y;
- bool has_acceleration_z;
- double acceleration_z;
- bool has_acceleration_including_gravity_x;
- double acceleration_including_gravity_x;
- bool has_acceleration_including_gravity_y;
- double acceleration_including_gravity_y;
- bool has_acceleration_including_gravity_z;
- double acceleration_including_gravity_z;
- bool has_rotation_rate_alpha;
- double rotation_rate_alpha;
- bool has_rotation_rate_beta;
- double rotation_rate_beta;
- bool has_rotation_rate_gamma;
- double rotation_rate_gamma;
- double interval;
+ bool has_acceleration_x = false;
+ double acceleration_x = 0.0;
+ bool has_acceleration_y = false;
+ double acceleration_y = 0.0;
+ bool has_acceleration_z = false;
+ double acceleration_z = 0.0;
+ bool has_acceleration_including_gravity_x = false;
+ double acceleration_including_gravity_x = 0.0;
+ bool has_acceleration_including_gravity_y = false;
+ double acceleration_including_gravity_y = 0.0;
+ bool has_acceleration_including_gravity_z = false;
+ double acceleration_including_gravity_z = 0.0;
+ bool has_rotation_rate_alpha = false;
+ double rotation_rate_alpha = 0.0;
+ bool has_rotation_rate_beta = false;
+ double rotation_rate_beta = 0.0;
+ bool has_rotation_rate_gamma = false;
+ double rotation_rate_gamma = 0.0;
+ double interval = false;
args->GetNext(&has_acceleration_x);
- args->GetNext(& acceleration_x);
+ args->GetNext(&acceleration_x);
args->GetNext(&has_acceleration_y);
- args->GetNext(& acceleration_y);
+ args->GetNext(&acceleration_y);
args->GetNext(&has_acceleration_z);
- args->GetNext(& acceleration_z);
+ args->GetNext(&acceleration_z);
args->GetNext(&has_acceleration_including_gravity_x);
- args->GetNext(& acceleration_including_gravity_x);
+ args->GetNext(&acceleration_including_gravity_x);
args->GetNext(&has_acceleration_including_gravity_y);
- args->GetNext(& acceleration_including_gravity_y);
+ args->GetNext(&acceleration_including_gravity_y);
args->GetNext(&has_acceleration_including_gravity_z);
- args->GetNext(& acceleration_including_gravity_z);
+ args->GetNext(&acceleration_including_gravity_z);
args->GetNext(&has_rotation_rate_alpha);
- args->GetNext(& rotation_rate_alpha);
+ args->GetNext(&rotation_rate_alpha);
args->GetNext(&has_rotation_rate_beta);
- args->GetNext(& rotation_rate_beta);
+ args->GetNext(&rotation_rate_beta);
args->GetNext(&has_rotation_rate_gamma);
- args->GetNext(& rotation_rate_gamma);
- args->GetNext(& interval);
+ args->GetNext(&rotation_rate_gamma);
+ args->GetNext(&interval);
runner_->SetMockDeviceMotion(has_acceleration_x, acceleration_x,
has_acceleration_y, acceleration_y,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698