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

Unified Diff: content/shell/renderer/test_runner/mock_presentation_client.cc

Issue 938033002: Fix Presentation API mocks: do not eagerly drop clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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: content/shell/renderer/test_runner/mock_presentation_client.cc
diff --git a/content/shell/renderer/test_runner/mock_presentation_client.cc b/content/shell/renderer/test_runner/mock_presentation_client.cc
index 02012bca821851a92d8e266e1e6c1aedfc266c70..eb1d4ff6284215e801a3f03aa41164e545276afc 100644
--- a/content/shell/renderer/test_runner/mock_presentation_client.cc
+++ b/content/shell/renderer/test_runner/mock_presentation_client.cc
@@ -20,8 +20,8 @@ MockPresentationClient::MockPresentationClient(MockPresentationService* service)
MockPresentationClient::~MockPresentationClient() {
DCHECK(!controller_);
- if (service_)
- service_->UnregisterPresentationClientMock(this);
+ DCHECK(service_);
+ service_->UnregisterPresentationClientMock(this);
}
void MockPresentationClient::SetScreenAvailability(bool available) {
@@ -38,7 +38,6 @@ void MockPresentationClient::SetScreenAvailability(bool available) {
void MockPresentationClient::Reset() {
screen_availability_ = false;
- service_ = nullptr;
}
void MockPresentationClient::setController(

Powered by Google App Engine
This is Rietveld 408576698