Index: content/shell/test_runner/test_interfaces.cc |
diff --git a/content/shell/test_runner/test_interfaces.cc b/content/shell/test_runner/test_interfaces.cc |
index deb23193f7356b118e73323deed0bff6b69c51a1..db9fcdba6e14b863b931767506934e591ebd6e6f 100644 |
--- a/content/shell/test_runner/test_interfaces.cc |
+++ b/content/shell/test_runner/test_interfaces.cc |
@@ -51,7 +51,10 @@ void TestInterfaces::SetMainView(blink::WebView* web_view) { |
} |
void TestInterfaces::SetDelegate(WebTestDelegate* delegate) { |
- gamepad_controller_ = GamepadController::Create(delegate); |
+ if (delegate) |
+ gamepad_controller_ = GamepadController::Create(delegate); |
+ else |
+ gamepad_controller_ = nullptr; |
test_runner_->SetDelegate(delegate); |
delegate_ = delegate; |
} |