| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/shell/browser/layout_test/blink_test_controller.h" | 5 #include "content/shell/browser/layout_test/blink_test_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <iostream> | 9 #include <iostream> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 main_window_->web_contents()->ExitFullscreen(/*will_cause_resize=*/false); | 652 main_window_->web_contents()->ExitFullscreen(/*will_cause_resize=*/false); |
| 653 | 653 |
| 654 ShellBrowserContext* browser_context = | 654 ShellBrowserContext* browser_context = |
| 655 ShellContentBrowserClient::Get()->browser_context(); | 655 ShellContentBrowserClient::Get()->browser_context(); |
| 656 StoragePartition* storage_partition = | 656 StoragePartition* storage_partition = |
| 657 BrowserContext::GetStoragePartition(browser_context, nullptr); | 657 BrowserContext::GetStoragePartition(browser_context, nullptr); |
| 658 storage_partition->GetServiceWorkerContext()->ClearAllServiceWorkersForTest( | 658 storage_partition->GetServiceWorkerContext()->ClearAllServiceWorkersForTest( |
| 659 base::Bind(base::IgnoreResult(&BlinkTestController::Send), | 659 base::Bind(base::IgnoreResult(&BlinkTestController::Send), |
| 660 base::Unretained(this), | 660 base::Unretained(this), |
| 661 new ShellViewMsg_Reset(render_view_host->GetRoutingID()))); | 661 new ShellViewMsg_Reset(render_view_host->GetRoutingID()))); |
| 662 storage_partition->ClearBluetoothAllowedDevicesMapForTesting(); |
| 662 } | 663 } |
| 663 | 664 |
| 664 void BlinkTestController::OnImageDump(const std::string& actual_pixel_hash, | 665 void BlinkTestController::OnImageDump(const std::string& actual_pixel_hash, |
| 665 const SkBitmap& image) { | 666 const SkBitmap& image) { |
| 666 SkAutoLockPixels image_lock(image); | 667 SkAutoLockPixels image_lock(image); |
| 667 | 668 |
| 668 printer_->PrintImageHeader(actual_pixel_hash, expected_pixel_hash_); | 669 printer_->PrintImageHeader(actual_pixel_hash, expected_pixel_hash_); |
| 669 | 670 |
| 670 // Only encode and dump the png if the hashes don't match. Encoding the | 671 // Only encode and dump the png if the hashes don't match. Encoding the |
| 671 // image is really expensive. | 672 // image is really expensive. |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 } | 975 } |
| 975 DCHECK(layout_test_control_map_[frame].get()); | 976 DCHECK(layout_test_control_map_[frame].get()); |
| 976 return layout_test_control_map_[frame].get(); | 977 return layout_test_control_map_[frame].get(); |
| 977 } | 978 } |
| 978 | 979 |
| 979 void BlinkTestController::HandleLayoutTestControlError(RenderFrameHost* frame) { | 980 void BlinkTestController::HandleLayoutTestControlError(RenderFrameHost* frame) { |
| 980 layout_test_control_map_.erase(frame); | 981 layout_test_control_map_.erase(frame); |
| 981 } | 982 } |
| 982 | 983 |
| 983 } // namespace content | 984 } // namespace content |
| OLD | NEW |