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

Side by Side Diff: content/public/test/browser_test_utils.cc

Issue 2427423003: Fix incorrect DCHECK in task manager's WebContentsEntry. (Closed)
Patch Set: Add test Created 3 years, 7 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
« no previous file with comments | « content/public/test/browser_test_utils.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 } 481 }
482 482
483 void CrashTab(WebContents* web_contents) { 483 void CrashTab(WebContents* web_contents) {
484 RenderProcessHost* rph = web_contents->GetRenderProcessHost(); 484 RenderProcessHost* rph = web_contents->GetRenderProcessHost();
485 RenderProcessHostWatcher watcher( 485 RenderProcessHostWatcher watcher(
486 rph, RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT); 486 rph, RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
487 rph->Shutdown(0, false); 487 rph->Shutdown(0, false);
488 watcher.Wait(); 488 watcher.Wait();
489 } 489 }
490 490
491 void SimulateUnresponsiveRenderer(WebContents* web_contents,
492 RenderWidgetHost* widget) {
493 static_cast<WebContentsImpl*>(web_contents)
494 ->RendererUnresponsive(RenderWidgetHostImpl::From(widget));
495 }
496
491 #if defined(USE_AURA) 497 #if defined(USE_AURA)
492 bool IsResizeComplete(aura::test::WindowEventDispatcherTestApi* dispatcher_test, 498 bool IsResizeComplete(aura::test::WindowEventDispatcherTestApi* dispatcher_test,
493 RenderWidgetHostImpl* widget_host) { 499 RenderWidgetHostImpl* widget_host) {
494 return !dispatcher_test->HoldingPointerMoves() && 500 return !dispatcher_test->HoldingPointerMoves() &&
495 !widget_host->resize_ack_pending_for_testing(); 501 !widget_host->resize_ack_pending_for_testing();
496 } 502 }
497 503
498 void WaitForResizeComplete(WebContents* web_contents) { 504 void WaitForResizeComplete(WebContents* web_contents) {
499 aura::Window* content = web_contents->GetContentNativeView(); 505 aura::Window* content = web_contents->GetContentNativeView();
500 if (!content) 506 if (!content)
(...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after
2031 bool user_gesture, 2037 bool user_gesture,
2032 bool last_unlocked_by_target, 2038 bool last_unlocked_by_target,
2033 bool privileged) { 2039 bool privileged) {
2034 IPC::IpcSecurityTestUtil::PwnMessageReceived( 2040 IPC::IpcSecurityTestUtil::PwnMessageReceived(
2035 process->GetChannel(), 2041 process->GetChannel(),
2036 ViewHostMsg_LockMouse(routing_id, user_gesture, last_unlocked_by_target, 2042 ViewHostMsg_LockMouse(routing_id, user_gesture, last_unlocked_by_target,
2037 privileged)); 2043 privileged));
2038 } 2044 }
2039 2045
2040 } // namespace content 2046 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/browser_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698