| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/public/test/browser_test_utils.h" | 5 #include "content/public/test/browser_test_utils.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <tuple> | 8 #include <tuple> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1145 } | 1145 } |
| 1146 | 1146 |
| 1147 // TODO(wjmaclean): The next two functions are a modified version of | 1147 // TODO(wjmaclean): The next two functions are a modified version of |
| 1148 // SurfaceHitTestReadyNotifier that (1) works for BrowserPlugin-based guests, | 1148 // SurfaceHitTestReadyNotifier that (1) works for BrowserPlugin-based guests, |
| 1149 // and (2) links outside of content-browsertests. At some point in time we | 1149 // and (2) links outside of content-browsertests. At some point in time we |
| 1150 // should probably merge these. | 1150 // should probably merge these. |
| 1151 namespace { | 1151 namespace { |
| 1152 | 1152 |
| 1153 bool ContainsSurfaceId(cc::SurfaceId container_surface_id, | 1153 bool ContainsSurfaceId(cc::SurfaceId container_surface_id, |
| 1154 RenderWidgetHostViewChildFrame* target_view) { | 1154 RenderWidgetHostViewChildFrame* target_view) { |
| 1155 if (container_surface_id.is_null()) | 1155 if (!container_surface_id.is_valid()) |
| 1156 return false; | 1156 return false; |
| 1157 for (cc::SurfaceId id : | 1157 for (cc::SurfaceId id : |
| 1158 GetSurfaceManager()->GetSurfaceForId(container_surface_id) | 1158 GetSurfaceManager()->GetSurfaceForId(container_surface_id) |
| 1159 ->referenced_surfaces()) { | 1159 ->referenced_surfaces()) { |
| 1160 if (id == target_view->SurfaceIdForTesting() || | 1160 if (id == target_view->SurfaceIdForTesting() || |
| 1161 ContainsSurfaceId(id, target_view)) | 1161 ContainsSurfaceId(id, target_view)) |
| 1162 return true; | 1162 return true; |
| 1163 } | 1163 } |
| 1164 return false; | 1164 return false; |
| 1165 } | 1165 } |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1767 | 1767 |
| 1768 std::string ascii_message = base::UTF16ToASCII(message); | 1768 std::string ascii_message = base::UTF16ToASCII(message); |
| 1769 if (base::MatchPattern(ascii_message, filter_)) { | 1769 if (base::MatchPattern(ascii_message, filter_)) { |
| 1770 message_ = ascii_message; | 1770 message_ = ascii_message; |
| 1771 message_loop_runner_->Quit(); | 1771 message_loop_runner_->Quit(); |
| 1772 } | 1772 } |
| 1773 return false; | 1773 return false; |
| 1774 } | 1774 } |
| 1775 | 1775 |
| 1776 } // namespace content | 1776 } // namespace content |
| OLD | NEW |