| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/test/ui_test_utils.h" | 5 #include "chrome/test/ui_test_utils.h" |
| 6 | 6 |
| 7 #include "base/json_reader.h" | 7 #include "base/json_reader.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 return observer.WaitForAppModalDialog(); | 412 return observer.WaitForAppModalDialog(); |
| 413 } | 413 } |
| 414 | 414 |
| 415 void CrashTab(TabContents* tab) { | 415 void CrashTab(TabContents* tab) { |
| 416 RenderProcessHost* rph = tab->render_view_host()->process(); | 416 RenderProcessHost* rph = tab->render_view_host()->process(); |
| 417 base::KillProcess(rph->process().handle(), 0, false); | 417 base::KillProcess(rph->process().handle(), 0, false); |
| 418 SimpleNotificationObserver<RenderProcessHost> | 418 SimpleNotificationObserver<RenderProcessHost> |
| 419 crash_observer(NotificationType::RENDERER_PROCESS_CLOSED, rph); | 419 crash_observer(NotificationType::RENDERER_PROCESS_CLOSED, rph); |
| 420 } | 420 } |
| 421 | 421 |
| 422 void WaitForFocusChange(RenderViewHost* rvh) { |
| 423 SimpleNotificationObserver<RenderViewHost> |
| 424 focus_observer(NotificationType::FOCUS_CHANGED_IN_PAGE, rvh); |
| 425 } |
| 426 |
| 427 void WaitForFocusInBrowser(Browser* browser) { |
| 428 SimpleNotificationObserver<Browser> |
| 429 focus_observer(NotificationType::FOCUS_RETURNED_TO_BROWSER, |
| 430 browser); |
| 431 } |
| 432 |
| 422 } // namespace ui_test_utils | 433 } // namespace ui_test_utils |
| OLD | NEW |