| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/test/content_browser_test_utils_internal.h" | 5 #include "content/test/content_browser_test_utils_internal.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( | 312 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
| 313 FROM_HERE, run_loop.QuitClosure(), TestTimeouts::tiny_timeout()); | 313 FROM_HERE, run_loop.QuitClosure(), TestTimeouts::tiny_timeout()); |
| 314 run_loop.Run(); | 314 run_loop.Run(); |
| 315 if (ContainsSurfaceId(root_surface_id_)) | 315 if (ContainsSurfaceId(root_surface_id_)) |
| 316 break; | 316 break; |
| 317 } | 317 } |
| 318 } | 318 } |
| 319 | 319 |
| 320 bool SurfaceHitTestReadyNotifier::ContainsSurfaceId( | 320 bool SurfaceHitTestReadyNotifier::ContainsSurfaceId( |
| 321 cc::SurfaceId container_surface_id) { | 321 cc::SurfaceId container_surface_id) { |
| 322 if (container_surface_id.is_null()) | 322 if (!container_surface_id.is_valid()) |
| 323 return false; | 323 return false; |
| 324 for (cc::SurfaceId id : | 324 for (cc::SurfaceId id : |
| 325 surface_manager_->GetSurfaceForId(container_surface_id) | 325 surface_manager_->GetSurfaceForId(container_surface_id) |
| 326 ->referenced_surfaces()) { | 326 ->referenced_surfaces()) { |
| 327 if (id == target_view_->SurfaceIdForTesting() || ContainsSurfaceId(id)) | 327 if (id == target_view_->SurfaceIdForTesting() || ContainsSurfaceId(id)) |
| 328 return true; | 328 return true; |
| 329 } | 329 } |
| 330 return false; | 330 return false; |
| 331 } | 331 } |
| 332 | 332 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 NavigationHandle* navigation_handle) { | 391 NavigationHandle* navigation_handle) { |
| 392 if (navigation_handle->HasCommitted() && | 392 if (navigation_handle->HasCommitted() && |
| 393 !navigation_handle->IsErrorPage() && | 393 !navigation_handle->IsErrorPage() && |
| 394 navigation_handle->GetURL() == url_ && | 394 navigation_handle->GetURL() == url_ && |
| 395 navigation_handle->GetFrameTreeNodeId() == frame_tree_node_id_) { | 395 navigation_handle->GetFrameTreeNodeId() == frame_tree_node_id_) { |
| 396 message_loop_runner_->Quit(); | 396 message_loop_runner_->Quit(); |
| 397 } | 397 } |
| 398 } | 398 } |
| 399 | 399 |
| 400 } // namespace content | 400 } // namespace content |
| OLD | NEW |