Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(735)

Side by Side Diff: content/test/content_browser_test_utils_internal.cc

Issue 2425923003: Replaced is_null() with is_valid in SurfaceId and related classes. (Closed)
Patch Set: Rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/render_widget.h ('k') | services/ui/public/cpp/window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | services/ui/public/cpp/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698