| 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 #ifndef CHROME_TEST_BASE_UI_TEST_UTILS_H_ | 5 #ifndef CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
| 6 #define CHROME_TEST_BASE_UI_TEST_UTILS_H_ | 6 #define CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <queue> | 10 #include <queue> |
| 11 #include <set> | 11 #include <set> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
| 16 #include "base/process.h" | 16 #include "base/process.h" |
| 17 #include "base/run_loop.h" | 17 #include "base/run_loop.h" |
| 18 #include "base/scoped_temp_dir.h" | 18 #include "base/scoped_temp_dir.h" |
| 19 #include "base/string16.h" | 19 #include "base/string16.h" |
| 20 #include "chrome/browser/ui/view_ids.h" | 20 #include "chrome/browser/ui/view_ids.h" |
| 21 #include "chrome/test/automation/dom_element_proxy.h" | 21 #include "chrome/test/automation/dom_element_proxy.h" |
| 22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
| 23 #include "content/public/browser/notification_details.h" |
| 23 #include "content/public/browser/notification_observer.h" | 24 #include "content/public/browser/notification_observer.h" |
| 24 #include "content/public/browser/notification_registrar.h" | 25 #include "content/public/browser/notification_registrar.h" |
| 25 #include "content/public/browser/notification_details.h" | |
| 26 #include "content/public/browser/notification_source.h" | 26 #include "content/public/browser/notification_source.h" |
| 27 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
| 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
| 29 #include "ui/base/keycodes/keyboard_codes.h" | 29 #include "ui/base/keycodes/keyboard_codes.h" |
| 30 #include "ui/gfx/native_widget_types.h" | 30 #include "ui/gfx/native_widget_types.h" |
| 31 #include "ui/ui_controls/ui_controls.h" | 31 #include "ui/ui_controls/ui_controls.h" |
| 32 #include "webkit/glue/window_open_disposition.h" | 32 #include "webkit/glue/window_open_disposition.h" |
| 33 | 33 |
| 34 #if defined(OS_WIN) | 34 #if defined(OS_WIN) |
| 35 #include "base/win/scoped_handle.h" | 35 #include "base/win/scoped_handle.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 47 class FilePath; | 47 class FilePath; |
| 48 class GURL; | 48 class GURL; |
| 49 class HistoryService; | 49 class HistoryService; |
| 50 class MessageLoop; | 50 class MessageLoop; |
| 51 class Profile; | 51 class Profile; |
| 52 class ScopedTempDir; | 52 class ScopedTempDir; |
| 53 class SkBitmap; | 53 class SkBitmap; |
| 54 class TabContents; | 54 class TabContents; |
| 55 class TemplateURLService; | 55 class TemplateURLService; |
| 56 | 56 |
| 57 namespace browser { | 57 namespace chrome { |
| 58 struct NavigateParams; | 58 struct NavigateParams; |
| 59 } | 59 } |
| 60 | 60 |
| 61 namespace content { | 61 namespace content { |
| 62 class RenderViewHost; | 62 class RenderViewHost; |
| 63 class RenderWidgetHost; | 63 class RenderWidgetHost; |
| 64 class WebContents; | 64 class WebContents; |
| 65 } | 65 } |
| 66 | 66 |
| 67 namespace gfx { | 67 namespace gfx { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // currently loading. Otherwise returns immediately. | 124 // currently loading. Otherwise returns immediately. |
| 125 void WaitForLoadStop(content::WebContents* tab); | 125 void WaitForLoadStop(content::WebContents* tab); |
| 126 | 126 |
| 127 // Opens |url| in an incognito browser window with the incognito profile of | 127 // Opens |url| in an incognito browser window with the incognito profile of |
| 128 // |profile|, blocking until the navigation finishes. This will create a new | 128 // |profile|, blocking until the navigation finishes. This will create a new |
| 129 // browser if a browser with the incognito profile does not exist. | 129 // browser if a browser with the incognito profile does not exist. |
| 130 void OpenURLOffTheRecord(Profile* profile, const GURL& url); | 130 void OpenURLOffTheRecord(Profile* profile, const GURL& url); |
| 131 | 131 |
| 132 // Performs the provided navigation process, blocking until the navigation | 132 // Performs the provided navigation process, blocking until the navigation |
| 133 // finishes. May change the params in some cases (i.e. if the navigation | 133 // finishes. May change the params in some cases (i.e. if the navigation |
| 134 // opens a new browser window). Uses browser::Navigate. | 134 // opens a new browser window). Uses chrome::Navigate. |
| 135 void NavigateToURL(browser::NavigateParams* params); | 135 void NavigateToURL(chrome::NavigateParams* params); |
| 136 | 136 |
| 137 // Navigates the selected tab of |browser| to |url|, blocking until the | 137 // Navigates the selected tab of |browser| to |url|, blocking until the |
| 138 // navigation finishes. Uses Browser::OpenURL --> browser::Navigate. | 138 // navigation finishes. Uses Browser::OpenURL --> chrome::Navigate. |
| 139 void NavigateToURL(Browser* browser, const GURL& url); | 139 void NavigateToURL(Browser* browser, const GURL& url); |
| 140 | 140 |
| 141 // Navigates the specified tab of |browser| to |url|, blocking until the | 141 // Navigates the specified tab of |browser| to |url|, blocking until the |
| 142 // navigation finishes. | 142 // navigation finishes. |
| 143 // |disposition| indicates what tab the navigation occurs in, and | 143 // |disposition| indicates what tab the navigation occurs in, and |
| 144 // |browser_test_flags| controls what to wait for before continuing. | 144 // |browser_test_flags| controls what to wait for before continuing. |
| 145 void NavigateToURLWithDisposition(Browser* browser, | 145 void NavigateToURLWithDisposition(Browser* browser, |
| 146 const GURL& url, | 146 const GURL& url, |
| 147 WindowOpenDisposition disposition, | 147 WindowOpenDisposition disposition, |
| 148 int browser_test_flags); | 148 int browser_test_flags); |
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 // ui_controls_linux.cc and ui_controls_mac.cc | 695 // ui_controls_linux.cc and ui_controls_mac.cc |
| 696 void ClickTask(ui_controls::MouseButton button, | 696 void ClickTask(ui_controls::MouseButton button, |
| 697 int state, | 697 int state, |
| 698 const base::Closure& followup); | 698 const base::Closure& followup); |
| 699 | 699 |
| 700 } // namespace internal | 700 } // namespace internal |
| 701 | 701 |
| 702 } // namespace ui_test_utils | 702 } // namespace ui_test_utils |
| 703 | 703 |
| 704 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ | 704 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
| OLD | NEW |