Chromium Code Reviews| Index: content/shell/browser/layout_test/blink_test_controller.cc |
| diff --git a/content/shell/browser/layout_test/blink_test_controller.cc b/content/shell/browser/layout_test/blink_test_controller.cc |
| index adea7036bdee1b106509502bed8c65c038735c1f..0c6a517df493ba25ad4bf2b0030d77be5585d4ee 100644 |
| --- a/content/shell/browser/layout_test/blink_test_controller.cc |
| +++ b/content/shell/browser/layout_test/blink_test_controller.cc |
| @@ -681,8 +681,6 @@ void BlinkTestController::OnTestFinished() { |
| test_phase_ = CLEAN_UP; |
| if (!printer_->output_finished()) |
| printer_->PrintImageFooter(); |
| - RenderViewHost* render_view_host = |
| - main_window_->web_contents()->GetRenderViewHost(); |
| main_window_->web_contents()->ExitFullscreen(/*will_cause_resize=*/false); |
| ShellBrowserContext* browser_context = |
| @@ -690,12 +688,16 @@ void BlinkTestController::OnTestFinished() { |
| StoragePartition* storage_partition = |
| BrowserContext::GetStoragePartition(browser_context, nullptr); |
| storage_partition->GetServiceWorkerContext()->ClearAllServiceWorkersForTest( |
| - base::Bind(base::IgnoreResult(&BlinkTestController::Send), |
| - base::Unretained(this), |
| - new ShellViewMsg_Reset(render_view_host->GetRoutingID()))); |
| + base::Bind(&BlinkTestController::OnAllServiceWorkersCleared, |
| + base::Unretained(this))); |
| storage_partition->ClearBluetoothAllowedDevicesMapForTesting(); |
| } |
| +void BlinkTestController::OnAllServiceWorkersCleared() { |
| + Send(new ShellViewMsg_Reset( |
| + main_window_->web_contents()->GetRenderViewHost()->GetRoutingID())); |
|
Łukasz Anforowicz
2017/06/22 16:45:45
It turns out that |main_window_| can be null here
|
| +} |
| + |
| void BlinkTestController::OnImageDump(const std::string& actual_pixel_hash, |
| const SkBitmap& image) { |
| printer_->PrintImageHeader(actual_pixel_hash, expected_pixel_hash_); |