Commit 4ff204b8 authored by mlamouri's avatar mlamouri Committed by Commit bot

Fix Presentation API mocks: do not drop eagerly drop clients.

BUG=412331

Review URL: https://codereview.chromium.org/938033002

Cr-Commit-Position: refs/heads/master@{#317057}
parent fea6440d
...@@ -20,8 +20,8 @@ MockPresentationClient::MockPresentationClient(MockPresentationService* service) ...@@ -20,8 +20,8 @@ MockPresentationClient::MockPresentationClient(MockPresentationService* service)
MockPresentationClient::~MockPresentationClient() { MockPresentationClient::~MockPresentationClient() {
DCHECK(!controller_); DCHECK(!controller_);
if (service_) DCHECK(service_);
service_->UnregisterPresentationClientMock(this); service_->UnregisterPresentationClientMock(this);
} }
void MockPresentationClient::SetScreenAvailability(bool available) { void MockPresentationClient::SetScreenAvailability(bool available) {
...@@ -38,7 +38,6 @@ void MockPresentationClient::SetScreenAvailability(bool available) { ...@@ -38,7 +38,6 @@ void MockPresentationClient::SetScreenAvailability(bool available) {
void MockPresentationClient::Reset() { void MockPresentationClient::Reset() {
screen_availability_ = false; screen_availability_ = false;
service_ = nullptr;
} }
void MockPresentationClient::setController( void MockPresentationClient::setController(
......
...@@ -29,7 +29,6 @@ void MockPresentationService::SetScreenAvailability(bool available) { ...@@ -29,7 +29,6 @@ void MockPresentationService::SetScreenAvailability(bool available) {
void MockPresentationService::Reset() { void MockPresentationService::Reset() {
FOR_EACH_OBSERVER(MockPresentationClient, presentation_clients_, Reset()); FOR_EACH_OBSERVER(MockPresentationClient, presentation_clients_, Reset());
presentation_clients_.Clear();
screen_availability_ = false; screen_availability_ = false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment