| 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 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1177 } | 1177 } |
| 1178 | 1178 |
| 1179 // TODO(wjmaclean): The next two functions are a modified version of | 1179 // TODO(wjmaclean): The next two functions are a modified version of |
| 1180 // SurfaceHitTestReadyNotifier that (1) works for BrowserPlugin-based guests, | 1180 // SurfaceHitTestReadyNotifier that (1) works for BrowserPlugin-based guests, |
| 1181 // and (2) links outside of content-browsertests. At some point in time we | 1181 // and (2) links outside of content-browsertests. At some point in time we |
| 1182 // should probably merge these. | 1182 // should probably merge these. |
| 1183 namespace { | 1183 namespace { |
| 1184 | 1184 |
| 1185 bool ContainsSurfaceId(cc::SurfaceId container_surface_id, | 1185 bool ContainsSurfaceId(cc::SurfaceId container_surface_id, |
| 1186 RenderWidgetHostViewChildFrame* target_view) { | 1186 RenderWidgetHostViewChildFrame* target_view) { |
| 1187 if (container_surface_id.is_null()) | 1187 if (!container_surface_id.is_valid()) |
| 1188 return false; | 1188 return false; |
| 1189 for (cc::SurfaceId id : | 1189 for (cc::SurfaceId id : |
| 1190 GetSurfaceManager()->GetSurfaceForId(container_surface_id) | 1190 GetSurfaceManager()->GetSurfaceForId(container_surface_id) |
| 1191 ->referenced_surfaces()) { | 1191 ->referenced_surfaces()) { |
| 1192 if (id == target_view->SurfaceIdForTesting() || | 1192 if (id == target_view->SurfaceIdForTesting() || |
| 1193 ContainsSurfaceId(id, target_view)) | 1193 ContainsSurfaceId(id, target_view)) |
| 1194 return true; | 1194 return true; |
| 1195 } | 1195 } |
| 1196 return false; | 1196 return false; |
| 1197 } | 1197 } |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1777 | 1777 |
| 1778 std::string ascii_message = base::UTF16ToASCII(message); | 1778 std::string ascii_message = base::UTF16ToASCII(message); |
| 1779 if (base::MatchPattern(ascii_message, filter_)) { | 1779 if (base::MatchPattern(ascii_message, filter_)) { |
| 1780 message_ = ascii_message; | 1780 message_ = ascii_message; |
| 1781 message_loop_runner_->Quit(); | 1781 message_loop_runner_->Quit(); |
| 1782 } | 1782 } |
| 1783 return false; | 1783 return false; |
| 1784 } | 1784 } |
| 1785 | 1785 |
| 1786 } // namespace content | 1786 } // namespace content |
| OLD | NEW |