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

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: Removed added printf statements; LocalFrameId::is_valid() no longer checks if nonce is 0. Created 4 years, 2 months 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
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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 313 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
314 FROM_HERE, run_loop.QuitClosure(), TestTimeouts::tiny_timeout()); 314 FROM_HERE, run_loop.QuitClosure(), TestTimeouts::tiny_timeout());
315 run_loop.Run(); 315 run_loop.Run();
316 if (ContainsSurfaceId(root_surface_id_)) 316 if (ContainsSurfaceId(root_surface_id_))
317 break; 317 break;
318 } 318 }
319 } 319 }
320 320
321 bool SurfaceHitTestReadyNotifier::ContainsSurfaceId( 321 bool SurfaceHitTestReadyNotifier::ContainsSurfaceId(
322 cc::SurfaceId container_surface_id) { 322 cc::SurfaceId container_surface_id) {
323 if (container_surface_id.is_null()) 323 if (!container_surface_id.is_valid())
324 return false; 324 return false;
325 for (cc::SurfaceId id : 325 for (cc::SurfaceId id :
326 surface_manager_->GetSurfaceForId(container_surface_id) 326 surface_manager_->GetSurfaceForId(container_surface_id)
327 ->referenced_surfaces()) { 327 ->referenced_surfaces()) {
328 if (id == target_view_->SurfaceIdForTesting() || ContainsSurfaceId(id)) 328 if (id == target_view_->SurfaceIdForTesting() || ContainsSurfaceId(id))
329 return true; 329 return true;
330 } 330 }
331 return false; 331 return false;
332 } 332 }
333 333
(...skipping 57 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

Powered by Google App Engine
This is Rietveld 408576698