| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/process/kill.h" | 10 #include "base/process/kill.h" |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 web_contents->GetController().GetLastCommittedEntry(); | 292 web_contents->GetController().GetLastCommittedEntry(); |
| 293 if (!last_entry) | 293 if (!last_entry) |
| 294 return false; | 294 return false; |
| 295 return last_entry->GetPageType() == page_type; | 295 return last_entry->GetPageType() == page_type; |
| 296 } | 296 } |
| 297 | 297 |
| 298 void CrashTab(WebContents* web_contents) { | 298 void CrashTab(WebContents* web_contents) { |
| 299 RenderProcessHost* rph = web_contents->GetRenderProcessHost(); | 299 RenderProcessHost* rph = web_contents->GetRenderProcessHost(); |
| 300 RenderProcessHostWatcher watcher( | 300 RenderProcessHostWatcher watcher( |
| 301 rph, RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT); | 301 rph, RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT); |
| 302 base::KillProcess(rph->GetHandle(), 0, false); | 302 rph->Shutdown(0, false); |
| 303 watcher.Wait(); | 303 watcher.Wait(); |
| 304 } | 304 } |
| 305 | 305 |
| 306 #if defined(USE_AURA) | 306 #if defined(USE_AURA) |
| 307 bool IsResizeComplete(aura::test::WindowEventDispatcherTestApi* dispatcher_test, | 307 bool IsResizeComplete(aura::test::WindowEventDispatcherTestApi* dispatcher_test, |
| 308 RenderWidgetHostImpl* widget_host) { | 308 RenderWidgetHostImpl* widget_host) { |
| 309 return !dispatcher_test->HoldingPointerMoves() && | 309 return !dispatcher_test->HoldingPointerMoves() && |
| 310 !widget_host->resize_ack_pending_for_testing(); | 310 !widget_host->resize_ack_pending_for_testing(); |
| 311 } | 311 } |
| 312 | 312 |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 } | 834 } |
| 835 // The queue should not be empty, unless we were quit because of a timeout. | 835 // The queue should not be empty, unless we were quit because of a timeout. |
| 836 if (message_queue_.empty()) | 836 if (message_queue_.empty()) |
| 837 return false; | 837 return false; |
| 838 *message = message_queue_.front(); | 838 *message = message_queue_.front(); |
| 839 message_queue_.pop(); | 839 message_queue_.pop(); |
| 840 return true; | 840 return true; |
| 841 } | 841 } |
| 842 | 842 |
| 843 } // namespace content | 843 } // namespace content |
| OLD | NEW |