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

Side by Side Diff: chrome/test/base/ui_test_utils.cc

Issue 8515027: Define the public version of the browser side RenderProcessHost interface. This interface is not ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/base/in_process_browser_test.cc ('k') | chrome_frame/test/net/fake_external_tab.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/base/ui_test_utils.h" 5 #include "chrome/test/base/ui_test_utils.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 23 matching lines...) Expand all
34 #include "chrome/browser/ui/find_bar/find_tab_helper.h" 34 #include "chrome/browser/ui/find_bar/find_tab_helper.h"
35 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 35 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
36 #include "chrome/common/chrome_notification_types.h" 36 #include "chrome/common/chrome_notification_types.h"
37 #include "chrome/common/chrome_paths.h" 37 #include "chrome/common/chrome_paths.h"
38 #include "chrome/common/extensions/extension_action.h" 38 #include "chrome/common/extensions/extension_action.h"
39 #include "chrome/test/automation/javascript_execution_controller.h" 39 #include "chrome/test/automation/javascript_execution_controller.h"
40 #include "chrome/test/base/bookmark_load_observer.h" 40 #include "chrome/test/base/bookmark_load_observer.h"
41 #include "chrome/test/test_navigation_observer.h" 41 #include "chrome/test/test_navigation_observer.h"
42 #include "content/browser/download/download_item.h" 42 #include "content/browser/download/download_item.h"
43 #include "content/browser/download/download_manager.h" 43 #include "content/browser/download/download_manager.h"
44 #include "content/browser/renderer_host/render_process_host.h"
45 #include "content/browser/renderer_host/render_view_host.h" 44 #include "content/browser/renderer_host/render_view_host.h"
46 #include "content/browser/tab_contents/navigation_controller.h" 45 #include "content/browser/tab_contents/navigation_controller.h"
47 #include "content/browser/tab_contents/navigation_entry.h" 46 #include "content/browser/tab_contents/navigation_entry.h"
48 #include "content/browser/tab_contents/tab_contents.h" 47 #include "content/browser/tab_contents/tab_contents.h"
49 #include "content/public/browser/notification_service.h" 48 #include "content/public/browser/notification_service.h"
49 #include "content/public/browser/render_process_host.h"
50 #include "googleurl/src/gurl.h" 50 #include "googleurl/src/gurl.h"
51 #include "net/base/net_util.h" 51 #include "net/base/net_util.h"
52 #include "testing/gtest/include/gtest/gtest.h" 52 #include "testing/gtest/include/gtest/gtest.h"
53 #include "third_party/skia/include/core/SkBitmap.h" 53 #include "third_party/skia/include/core/SkBitmap.h"
54 #include "third_party/skia/include/core/SkColor.h" 54 #include "third_party/skia/include/core/SkColor.h"
55 #include "ui/gfx/size.h" 55 #include "ui/gfx/size.h"
56 56
57 #if defined(TOOLKIT_VIEWS) 57 #if defined(TOOLKIT_VIEWS)
58 #include "views/focus/accelerator_handler.h" 58 #include "views/focus/accelerator_handler.h"
59 #endif 59 #endif
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 } 498 }
499 499
500 AppModalDialog* WaitForAppModalDialog() { 500 AppModalDialog* WaitForAppModalDialog() {
501 TestNotificationObserver observer; 501 TestNotificationObserver observer;
502 RegisterAndWait(&observer, chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN, 502 RegisterAndWait(&observer, chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN,
503 content::NotificationService::AllSources()); 503 content::NotificationService::AllSources());
504 return content::Source<AppModalDialog>(observer.source()).ptr(); 504 return content::Source<AppModalDialog>(observer.source()).ptr();
505 } 505 }
506 506
507 void CrashTab(TabContents* tab) { 507 void CrashTab(TabContents* tab) {
508 RenderProcessHost* rph = tab->render_view_host()->process(); 508 content::RenderProcessHost* rph = tab->render_view_host()->process();
509 base::KillProcess(rph->GetHandle(), 0, false); 509 base::KillProcess(rph->GetHandle(), 0, false);
510 TestNotificationObserver observer; 510 TestNotificationObserver observer;
511 RegisterAndWait(&observer, content::NOTIFICATION_RENDERER_PROCESS_CLOSED, 511 RegisterAndWait(&observer, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
512 content::Source<RenderProcessHost>(rph)); 512 content::Source<content::RenderProcessHost>(rph));
513 } 513 }
514 514
515 void WaitForFocusChange(TabContents* tab_contents) { 515 void WaitForFocusChange(TabContents* tab_contents) {
516 TestNotificationObserver observer; 516 TestNotificationObserver observer;
517 RegisterAndWait(&observer, content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE, 517 RegisterAndWait(&observer, content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
518 content::Source<TabContents>(tab_contents)); 518 content::Source<TabContents>(tab_contents));
519 } 519 }
520 520
521 void WaitForFocusInBrowser(Browser* browser) { 521 void WaitForFocusInBrowser(Browser* browser) {
522 TestNotificationObserver observer; 522 TestNotificationObserver observer;
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 return taker.TakeRenderWidgetSnapshot(rwh, page_size, page_size, bitmap); 995 return taker.TakeRenderWidgetSnapshot(rwh, page_size, page_size, bitmap);
996 } 996 }
997 997
998 bool TakeEntirePageSnapshot(RenderViewHost* rvh, SkBitmap* bitmap) { 998 bool TakeEntirePageSnapshot(RenderViewHost* rvh, SkBitmap* bitmap) {
999 DCHECK(bitmap); 999 DCHECK(bitmap);
1000 SnapshotTaker taker; 1000 SnapshotTaker taker;
1001 return taker.TakeEntirePageSnapshot(rvh, bitmap); 1001 return taker.TakeEntirePageSnapshot(rvh, bitmap);
1002 } 1002 }
1003 1003
1004 } // namespace ui_test_utils 1004 } // namespace ui_test_utils
OLDNEW
« no previous file with comments | « chrome/test/base/in_process_browser_test.cc ('k') | chrome_frame/test/net/fake_external_tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698