| Index: content/shell/renderer/test_runner/test_runner.cc
|
| diff --git a/content/shell/renderer/test_runner/test_runner.cc b/content/shell/renderer/test_runner/test_runner.cc
|
| index b58049316603abbf6368aaf1655327e4d6eb3bdd..18dfb0729bc735883970ac60e04c21111b081b2a 100644
|
| --- a/content/shell/renderer/test_runner/test_runner.cc
|
| +++ b/content/shell/renderer/test_runner/test_runner.cc
|
| @@ -172,6 +172,7 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
|
| int max_width,
|
| int max_height);
|
| bool DisableAutoResizeMode(int new_width, int new_height);
|
| + void SetMockDeviceLight(gin::Arguments* args);
|
| void SetMockDeviceMotion(gin::Arguments* args);
|
| void SetMockDeviceOrientation(gin::Arguments* args);
|
| void SetMockScreenOrientation(const std::string& orientation);
|
| @@ -359,6 +360,8 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
|
| &TestRunnerBindings::EnableAutoResizeMode)
|
| .SetMethod("disableAutoResizeMode",
|
| &TestRunnerBindings::DisableAutoResizeMode)
|
| + .SetMethod("setMockDeviceLight",
|
| + &TestRunnerBindings::SetMockDeviceLight)
|
| .SetMethod("setMockDeviceMotion",
|
| &TestRunnerBindings::SetMockDeviceMotion)
|
| .SetMethod("setMockDeviceOrientation",
|
| @@ -767,6 +770,14 @@ bool TestRunnerBindings::DisableAutoResizeMode(int new_width, int new_height) {
|
| return false;
|
| }
|
|
|
| +void TestRunnerBindings::SetMockDeviceLight(gin::Arguments* args) {
|
| + if (!runner_)
|
| + return;
|
| + double value;
|
| + args->GetData(&value);
|
| + runner_->SetMockDeviceLight(value);
|
| +}
|
| +
|
| void TestRunnerBindings::SetMockDeviceMotion(gin::Arguments* args) {
|
| if (!runner_)
|
| return;
|
| @@ -2123,6 +2134,11 @@ bool TestRunner::DisableAutoResizeMode(int new_width, int new_height) {
|
| return true;
|
| }
|
|
|
| +void TestRunner::SetMockDeviceLight(
|
| + double value) {
|
| + delegate_->setDeviceLightData(value);
|
| +}
|
| +
|
| void TestRunner::SetMockDeviceMotion(
|
| bool has_acceleration_x, double acceleration_x,
|
| bool has_acceleration_y, double acceleration_y,
|
|
|