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

Unified Diff: content/shell/test_runner/test_interfaces.cc

Issue 2738513004: TestInterfaces: support delegate clearing. (Closed)
Patch Set: Created 3 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
« 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: 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;
}
« 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